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
[dynamo] add infinite generators itertools.{count, repeat, cycle}
#110967
[dynamo] add infinite generators itertools.{count, repeat, cycle}
#110967
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/110967
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 9d1692c with merge base f74d766 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "release notes: dynamo" |
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.
mutable VTs no good
…uang/infinite-iterators
This comment was marked as outdated.
This comment was marked as outdated.
…uang/infinite-iterators
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!
…uang/infinite-iterators
@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 |
…ytorch#110967) Fixes https://github.com/pytorch/pytorch/pull/110953/files#r1352868935 Depends on: pytorch#110953 Why not use these for `repeat(item, count)`: > These are not preferred as they return an opaque VariableTracker. In particular, one cannot do `enumerate(repeat(1))`. `repeat(1, 10)` benefits from the integration enjoyed by `ListVariableIterator` Follow ups: - [ ] make listiterator an IteratorVariable, define iterator integrations on base IteratorVariable where unspecialized pytorch#110967 (comment) - Please make a new issue for this - [ ] explore integrating cpython itertools test suite pytorch#110967 (comment) - [ ] Use something other than `StopIteration` to handle iterator termination pytorch#110967 (comment) - [ ] Add test case for consuming iterator simultaneously from two code points https://github.com/pytorch/pytorch/pull/110967/files#r1358325511 Pull Request resolved: pytorch#110967 Approved by: https://github.com/ezyang
…ytorch#110967) Fixes https://github.com/pytorch/pytorch/pull/110953/files#r1352868935 Depends on: pytorch#110953 Why not use these for `repeat(item, count)`: > These are not preferred as they return an opaque VariableTracker. In particular, one cannot do `enumerate(repeat(1))`. `repeat(1, 10)` benefits from the integration enjoyed by `ListVariableIterator` Follow ups: - [ ] make listiterator an IteratorVariable, define iterator integrations on base IteratorVariable where unspecialized pytorch#110967 (comment) - Please make a new issue for this - [ ] explore integrating cpython itertools test suite pytorch#110967 (comment) - [ ] Use something other than `StopIteration` to handle iterator termination pytorch#110967 (comment) - [ ] Add test case for consuming iterator simultaneously from two code points https://github.com/pytorch/pytorch/pull/110967/files#r1358325511 Pull Request resolved: pytorch#110967 Approved by: https://github.com/ezyang
…ytorch#110967) Fixes https://github.com/pytorch/pytorch/pull/110953/files#r1352868935 Depends on: pytorch#110953 Why not use these for `repeat(item, count)`: > These are not preferred as they return an opaque VariableTracker. In particular, one cannot do `enumerate(repeat(1))`. `repeat(1, 10)` benefits from the integration enjoyed by `ListVariableIterator` Follow ups: - [ ] make listiterator an IteratorVariable, define iterator integrations on base IteratorVariable where unspecialized pytorch#110967 (comment) - Please make a new issue for this - [ ] explore integrating cpython itertools test suite pytorch#110967 (comment) - [ ] Use something other than `StopIteration` to handle iterator termination pytorch#110967 (comment) - [ ] Add test case for consuming iterator simultaneously from two code points https://github.com/pytorch/pytorch/pull/110967/files#r1358325511 Pull Request resolved: pytorch#110967 Approved by: https://github.com/ezyang
Fixes https://github.com/pytorch/pytorch/pull/110953/files#r1352868935
Depends on: #110953
Why not use these for
repeat(item, count)
:Follow ups:
itertools.{count, repeat, cycle}
#110967 (comment)itertools.{count, repeat, cycle}
#110967 (comment)StopIteration
to handle iterator termination [dynamo] add infinite generatorsitertools.{count, repeat, cycle}
#110967 (comment)cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @chenyang78 @aakhundov @kadeng @ezyang