Skip to content

torch_dispatch x HOP handling #140322

@zou3519

Description

@zou3519

From discussion with @Chillee and @bdhirsh.

  1. torch_dispatch mode should have a flag for if it accepts HOPs or not. If it does, then the HOP should get passed into the __torch_dispatch__.
  2. We should give HOPs similar properties to ops. That is, they should have a .tag, the .opoverload field should probably point back at itself, etc.
  3. HOPs should take in a flag for if they're "passthrough" or "operator like". Maybe we can give generic handling for the passthrough HOPs x torch_dispatch stuff (but open question as to how this actually works).

cc @ezyang @gchanan @kadeng @msaroufim @chauhang @penguinwu @ydwu4 @bdhirsh @yf225

Metadata

Metadata

Assignees

No one assigned

    Labels

    high prioritymodule: dispatchDispatchStub, Type, void pointer table, c10 dispatchmodule: higher order operatorstorch.cond and similarmodule: pt2-dispatcherPT2 dispatcher-related issues (e.g., aotdispatch, functionalization, faketensor, custom-op,oncall: pt2triagedThis 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