Skip to content

Conversation

@Erik-Lundell
Copy link
Collaborator

@Erik-Lundell Erik-Lundell commented Jan 22, 2025

If a node is created without specifying an overload, A OpOverloadPacket is created, rather than an OpOverload. This works in a GraphModule, but the OpOverloadPacket is not a valid operator type in the _EXIREdgeDialectVerifier, which means that Edge ExportedPrograms can't contain a GraphModule with such ops.

In short, specifying using the default overload seems to be the more correct way of calling a custom
operator.

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218

@Erik-Lundell Erik-Lundell added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk topic: not user facing labels Jan 22, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Jan 22, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7836

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 Cancelled Jobs, 1 Unrelated Failure

As of commit b9a2862 with merge base e78ed83 (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 22, 2025
@Erik-Lundell
Copy link
Collaborator Author

CI Failure unrelated.

Copy link
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC

return super().allowed_op_types() + (torch._ops.OpOverloadPacket,)
allows OpOverloadPacket for torch ops but not for custom ops? Is that the main problem?

If yes, this is OK.

@Erik-Lundell
Copy link
Collaborator Author

IIUC

return super().allowed_op_types() + (torch._ops.OpOverloadPacket,)

allows OpOverloadPacket for torch ops but not for custom ops? Is that the main problem?

If yes, this is OK.

I think

return super().allowed_op_types() + (EdgeOpOverload, types.FunctionType)
is the relevent line but yes, that is the main problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm topic: not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants