- Notifications
You must be signed in to change notification settings - Fork26.3k
[AOTInductor] Fix state of ConstantFolding#153152
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Summary:Bug fix for constant folding states. We are not setting the correctstate for each updates.One race condition would be:(1) All threads obtain the model_exec_lock from main run.(2) In second round of updated constant buffer, we should have set secondary as INITIALIZED but primary is mistakenly set instead.(3) run_const_fold get called and an model_exec_lock is obtained, waiting for available at this time.(4) main run enters INITIALIZED, waiting for unique_lock (which a shared_lock is being held by (3) at this moment)Test Plan:TBDReviewers:Subscribers:Tasks:Tags:[ghstack-poisoned]
pytorch-botbot commentedMay 8, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🔗 Helpful Links🧪 See artifacts and rendered test results athud.pytorch.org/pr/153152
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit3f4df42 with merge basebfc0920 ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Summary:Bug fix for constant folding states. We are not setting the correct state for each updates.One race condition would be:(1) All threads obtain the model_exec_lock from main run.(2) In second round of updated constant buffer, we should have set secondary as INITIALIZED but primary is mistakenly set instead.(3) run_const_fold get called and an model_exec_lock is obtained, waiting for available at this time.(4) main run enters INITIALIZED, waiting for unique_lock (which a shared_lock is being held by (3) at this moment)Test Plan:TBDReviewers:Subscribers:Tasks:Tags:[ghstack-poisoned]
Summary:Bug fix for constant folding states. We are not setting the correctstate for each updates.One race condition would be:(1) All threads obtain the model_exec_lock from main run.(2) In second round of updated constant buffer, we should have set secondary as INITIALIZED but primary is mistakenly set instead.(3) run_const_fold get called and an model_exec_lock is obtained, waiting for available at this time.(4) main run enters INITIALIZED, waiting for unique_lock (which a shared_lock is being held by (3) at this moment)Test Plan:TBDReviewers:Subscribers:Tasks:Tags:ghstack-source-id:05a225ePull Requestresolved:#153152
jingsh 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.
lgtm
chenyang78 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.
Nice finding and thanks for fixing this!
muchulee8 commentedMay 9, 2025
@pytorchbot merge |
pytorchmergebot commentedMay 9, 2025
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in thewiki. Questions? Feedback? Please reach out to thePyTorch DevX Team |
Uh oh!
There was an error while loading.Please reload this page.
Stack fromghstack (oldest at bottom):
Summary:
Bug fix for constant folding states. We are not setting the correct state for each updates.
One race condition would be:
(1) All threads obtain the model_exec_lock from main run.
(2) In second round of updated constant buffer, we should have set secondary as INITIALIZED but primary is mistakenly set instead.
(3) run_const_fold get called and an model_exec_lock is obtained, waiting for available at this time.
(4) main run enters INITIALIZED, waiting for unique_lock (which a shared_lock is being held by (3) at this moment)
Test Plan:
TBD
Reviewers:
Subscribers:
Tasks:
Tags: