You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update how Dynamo decides to graph break on an OpOverloadPacket (#112200)
Summary:
Previously, under config.only_allow_pt2_compliant_ops, Dynamo graph
breaks when it see an OpOverloadPacket where any overloads are not
PT2 compliant. This is potentially brittle: if someone (unlikely) adds
a new overload for a custom operator, then this would cause a
previously non-graph-breaking call to the OpOverloadPacket to graph break.
In this PR:
- When Dynamo is about to write a call to an operator to the FX graph,
we check if it is PT2 compliant.
- For OpOverload, we check to see if the tag is on it
- For OpOverloadPacket, we do overload resolution and check to see if
the tag is on the OpOverload that it resolves to.
X-link: pytorch/pytorch#112200
Approved by: https://github.com/bdhirsh
Reviewed By: ZainRizvi
Differential Revision: D50873052
Pulled By: zou3519
fbshipit-source-id: c95b9797185f4bfc9edd2eb2e48f73b8dd56154f
0 commit comments