-
Notifications
You must be signed in to change notification settings - Fork 24.3k
[Dynamo] Replace unimplemented
with unimplemented_v2
in torch/_dynamo/variables/nn_module.py
#151895
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/151895
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ae69b9a with merge base e4a1a16 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
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.
minor comments
torch/_dynamo/variables/nn_module.py
Outdated
explanation="Dynamo encountered a custom `__getattr__` method " | ||
"on an `nn.Module` instance that is not a standard Python function. " | ||
"Only function-based `__getattr__` methods can be traced.", | ||
hints=[*graph_break_hints.USER_ERROR], |
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.
I think this graph break would also trigger on C functions as well - in that case, this is not a user error then?
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.
Yes that's right! Have made changes in this commit: fd4ddb8
torch/_dynamo/variables/nn_module.py
Outdated
gb_type="UnspecializedNNModuleVariable missing method", | ||
context=f"call_method: {self} {name} {args} {kwargs}", | ||
explanation=f"Dynamo does not support tracing method {name}", | ||
hints=[], |
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.
Might be difficult to debug ( *graph_break_hints.DIFFICULT
) because we don't really define "unspecialized nn.Module" for the user very well.
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.
Thanks for your review! Have updated in this commit: 1b36b7a
f32a060
to
1b36b7a
Compare
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
@pytorchbot merge -r |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Co-authored-by: William Wen <william.wen42@gmail.com>
Co-authored-by: William Wen <william.wen42@gmail.com>
Co-authored-by: William Wen <william.wen42@gmail.com>
Co-authored-by: William Wen <william.wen42@gmail.com>
Co-authored-by: William Wen <william.wen42@gmail.com>
Successfully rebased |
1b36b7a
to
ae69b9a
Compare
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 3 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Part of #147913
Replace
unimplemented
withunimplemented_v2
intorch/_dynamo/variables/nn_module.py
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames