-
Notifications
You must be signed in to change notification settings - Fork 26.2k
[dynamo] fix store attr graph break in with block #166036
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
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/166036
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit c49752c with merge base ad4dc52 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@williamwen42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
| ) | ||
| self.output.add_output_instructions([copy.copy(inst)]) | ||
| inst_copy = copy.copy(inst) | ||
| inst_copy.exn_tab_entry = None |
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.
So this is the root fix (need to set exn_tab_entry to None) - can you provide a bit more context for me as to why this fixes the error? I am assuming it is because when this is set bytecode_transformation assumes certain things about the instr which isn't true
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.
Before, we would add an instruction to the output code with an invalid exn_tab_entry (since it refers to the old set of instructions). This correction is done elsewhere in symbolic_convert.py - i.e.
pytorch/torch/_dynamo/symbolic_convert.py
Line 1019 in a988510
| inst_copy.exn_tab_entry = None |
Lucaskabela
left a comment
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 elaborating, lgtm
|
@williamwen42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
|
@williamwen42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
Starting merge as part of PR stack under #166040 |
Fixes #166176 The error I attempted to fix in #162318 was still appearing internally. Surprised that this wasn't caught anywhere 😰 Pull Request resolved: #166040 Approved by: https://github.com/Lucaskabela ghstack dependencies: #166036
|
@pytorchbot cherry-pick --onto release/2.9 --fixes "error in new nested graphbreak feature (#166033)" -c bugfix |
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchbot cherry-pick --onto release/2.9 --fixes "error in new nested graphbreak feature (#166033)" -c fixnewfeature |
Cherry picking #166036Command Details for Dev Infra teamRaised by workflow job |
|
I will try to get this cherry-pick request tomorrow |
Fixes #166033 Differential Revision: [D85198055](https://our.internmc.facebook.com/intern/diff/D85198055) Pull Request resolved: #166036 Approved by: https://github.com/Lucaskabela (cherry picked from commit ebb2b2e)
* [dynamo] fix store attr graph break in with block (#166036) Fixes #166033 Differential Revision: [D85198055](https://our.internmc.facebook.com/intern/diff/D85198055) Pull Request resolved: #166036 Approved by: https://github.com/Lucaskabela (cherry picked from commit ebb2b2e) * [dynamo] fix keyerror in resume_execution (again) (#166040) Fixes #166176 The error I attempted to fix in #162318 was still appearing internally. Surprised that this wasn't caught anywhere 😰 Pull Request resolved: #166040 Approved by: https://github.com/Lucaskabela ghstack dependencies: #166036 (cherry picked from commit 32fe4f6) * fix self.current_instruction -> cur_tx.current_instruction --------- Co-authored-by: William Wen <[email protected]>
Stack from ghstack (oldest at bottom):
Fixes #166033
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames @Lucaskabela
Differential Revision: D85198055