Skip to content

[structured] Meta-impl split implies redundant dtype tests #57742

@ezyang

Description

@ezyang

A meta function is supposed to raise an error if input dtypes are incorrect. So we must do a condition on the input dtype to check if they are valid.

A typical kernel needs to do a dispatch on dtype to actually get to the dtype-specialized kernel.

This means that the meta-impl split means we have to redundantly condition on dtypes twice, whereas previously it only needed to be done once. It would be nice if this weren't the case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    better-engineeringRelatively self-contained tasks for better engineering contributorstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions