-
Notifications
You must be signed in to change notification settings - Fork 25.6k
fix(dynamo): Incorrect accumulate
implementation, bad tests
#110683
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(dynamo): Incorrect accumulate
implementation, bad tests
#110683
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/110683
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit e1ea8f0 with merge base 9e72c9c ( UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
call_function
API usagecall_function
API usage, fix bad tests
call_function
API usage, fix bad testsaccumulate
implementation, bad tests
l = [a, b, c, d, x] | ||
for i, t in enumerate(l): | ||
l[i] = t * x | ||
return itertools.accumulate(l, func=builtin_op) |
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.
we will handle kwargs case in subsequent PR
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.
PR here: #110686
torch/_dynamo/variables/misc.py
Outdated
else: | ||
try: | ||
acc = func(tx, item, acc) | ||
acc = func(tx, acc, item) |
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.
We cannot assume commutativity (e.g. operator.sub)
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.
This is a bug fix, good catch.
@pytorchbot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
@pytorchbot label "topic: not user facing" |
@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 |
Follow up to: #110683 Pull Request resolved: #110686 Approved by: https://github.com/ezyang
Root cause of: #110287
Fixed many tests that didn't actually test due to unreliability of
CompileCounter.frame_count
in detecting graph breaks: #110730cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @chenyang78 @aakhundov @kadeng @ezyang