New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix jit.trace mis-handling of InterfaceType #53052
Conversation
💊 CI failures summary and remediationsAs of commit 49b18c8 (more details on the Dr. CI page):
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gmagogsfm has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gmagogsfm has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. Thanks for the fix!
`jit.trace` recursively gathers all named attributes in module at beginning of tracing. This is fine in a pure-tracing environment, but breaks when a scripted module that contains an InterfaceType'd submodule is involved. Because InterfaceType, by design, is not allowed to have any attribute, thus some of the gathered attributes will turn into fatal errors in following some graph rewrite passes. This PR fixes this bug by distinguishing InterfaceType'd submodules from normal ClassType'd submodules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gmagogsfm has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Codecov Report
@@ Coverage Diff @@
## master #53052 +/- ##
=======================================
Coverage 78.00% 78.01%
=======================================
Files 1848 1848
Lines 179724 179726 +2
=======================================
+ Hits 140200 140205 +5
+ Misses 39524 39521 -3 |
@gmagogsfm merged this pull request in f448c59. |
Summary: `jit.trace` recursively gathers all named attributes in module at beginning of tracing. This is fine in a pure-tracing environment, but breaks when a scripted module that contains an InterfaceType'd submodule is involved. Because InterfaceType, by design, is not allowed to have any attribute, thus some of the gathered attributes will turn into fatal errors in following some graph rewrite passes. This PR fixes this bug by distinguishing InterfaceType'd submodules from normal ClassType'd submodules. Pull Request resolved: pytorch#53052 Reviewed By: wanchaol Differential Revision: D26735566 Pulled By: gmagogsfm fbshipit-source-id: a14aee6f1fe8000f80c2dc60bdf19acee6225090
Summary: `jit.trace` recursively gathers all named attributes in module at beginning of tracing. This is fine in a pure-tracing environment, but breaks when a scripted module that contains an InterfaceType'd submodule is involved. Because InterfaceType, by design, is not allowed to have any attribute, thus some of the gathered attributes will turn into fatal errors in following some graph rewrite passes. This PR fixes this bug by distinguishing InterfaceType'd submodules from normal ClassType'd submodules. Pull Request resolved: pytorch#53052 Reviewed By: wanchaol Differential Revision: D26735566 Pulled By: gmagogsfm fbshipit-source-id: a14aee6f1fe8000f80c2dc60bdf19acee6225090
jit.trace
recursively gathers all named attributes in module at beginning oftracing. This is fine in a pure-tracing environment, but breaks when a
scripted module that contains an InterfaceType'd submodule is involved.
Because InterfaceType, by design, is not allowed to have any attribute,
thus some of the gathered attributes will turn into fatal errors in
following some graph rewrite passes.
This PR fixes this bug by distinguishing InterfaceType'd submodules from
normal ClassType'd submodules.