Repository navigation
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/164522
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 eb32465 with merge base fa560e1 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Oct 2, 2025
[ghstack-poisoned]
This was referenced Oct 7, 2025
[ghstack-poisoned]
Contributor
Author
|
@pytorchbot merge |
Collaborator
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 |
pytorchmergebot
pushed a commit
that referenced
this pull request
Oct 30, 2025
Preivously, we would stash a single stream value we constructed at trace time in a global and return the same value from repeated calls to the graph. With this PR, we construct the stream value in advance, reference the constructed value in the graph via the lookup table, and if that value is returned as an output, read the value from the lookup table and return it (in bytecode, not as a graph output, since we don't support arbitrary stream outputs). Pull Request resolved: #164819 Approved by: https://github.com/anijain2305 ghstack dependencies: #164304, #164522
pytorchmergebot
pushed a commit
that referenced
this pull request
Oct 30, 2025
Pull Request resolved: #165211 Approved by: https://github.com/anijain2305 ghstack dependencies: #164304, #164522, #164819
BoyuanFeng
pushed a commit
that referenced
this pull request
Oct 31, 2025
BoyuanFeng
pushed a commit
that referenced
this pull request
Oct 31, 2025
This reverts commit cde81e9. Reverted #164522 on behalf of https://github.com/atalman due to Breaks periodic: test/dynamo/test_streams.py::TestStreams::test_stream_weakref [GH job link](https://github.com/pytorch/pytorch/actions/runs/18909552619/job/53979171605) [HUD commit link](https://hud.pytorch.org/pytorch/pytorch/commit/cde81e92b95eee9af2879c9c75f7b03699ca72ad) ([comment](#164522 (comment)))
BoyuanFeng
pushed a commit
that referenced
this pull request
Oct 31, 2025
Pull Request resolved: #164522 Approved by: https://github.com/williamwen42 ghstack dependencies: #164304
BoyuanFeng
pushed a commit
that referenced
this pull request
Oct 31, 2025
Preivously, we would stash a single stream value we constructed at trace time in a global and return the same value from repeated calls to the graph. With this PR, we construct the stream value in advance, reference the constructed value in the graph via the lookup table, and if that value is returned as an output, read the value from the lookup table and return it (in bytecode, not as a graph output, since we don't support arbitrary stream outputs). Pull Request resolved: #164819 Approved by: https://github.com/anijain2305 ghstack dependencies: #164304, #164522
BoyuanFeng
pushed a commit
that referenced
this pull request
Oct 31, 2025
Pull Request resolved: #165211 Approved by: https://github.com/anijain2305 ghstack dependencies: #164304, #164522, #164819
Merged
5 tasks
etaf
pushed a commit
to etaf/pytorch-inductor-xpu
that referenced
this pull request
Nov 4, 2025
Preivously, we would stash a single stream value we constructed at trace time in a global and return the same value from repeated calls to the graph. With this PR, we construct the stream value in advance, reference the constructed value in the graph via the lookup table, and if that value is returned as an output, read the value from the lookup table and return it (in bytecode, not as a graph output, since we don't support arbitrary stream outputs). Pull Request resolved: pytorch#164819 Approved by: https://github.com/anijain2305 ghstack dependencies: pytorch#164304, pytorch#164522
etaf
pushed a commit
to etaf/pytorch-inductor-xpu
that referenced
this pull request
Nov 4, 2025
Pull Request resolved: pytorch#165211 Approved by: https://github.com/anijain2305 ghstack dependencies: pytorch#164304, pytorch#164522, pytorch#164819
etaf
pushed a commit
to etaf/pytorch-inductor-xpu
that referenced
this pull request
Nov 4, 2025
merge into stream tests Pull Request resolved: pytorch#165212 Approved by: https://github.com/anijain2305 ghstack dependencies: pytorch#164304, pytorch#164522, pytorch#164819, pytorch#165211
etaf
pushed a commit
to etaf/pytorch-inductor-xpu
that referenced
this pull request
Nov 4, 2025
…e index (pytorch#165356) Pull Request resolved: pytorch#165356 Approved by: https://github.com/anijain2305 ghstack dependencies: pytorch#164304, pytorch#164522, pytorch#164819, pytorch#165211, pytorch#165212
Khanaksahu
pushed a commit
to Khanaksahu/pytorch
that referenced
this pull request
Nov 17, 2025
ghstack-source-id: c708eee Pull Request resolved: pytorch/pytorch#164522
Khanaksahu
pushed a commit
to Khanaksahu/pytorch-fork
that referenced
this pull request
Nov 17, 2025
ghstack-source-id: 49e3de1 Pull Request resolved: pytorch/pytorch#164522
Khanaksahu
pushed a commit
to Khanaksahu/pytorch-fork
that referenced
this pull request
Nov 17, 2025
ghstack-source-id: 048d1a0 Pull Request resolved: pytorch/pytorch#164522
pytorch-bot Bot
pushed a commit
that referenced
this pull request
Apr 13, 2026
torch.Generator is defined via the raw CPython API and did not set tp_weaklistoffset, so weakref.ref(generator) raised TypeError. The proxy tensor tracing infrastructure tracks opaque objects in a WeakIdKeyDictionary, so weak reference support is a prerequisite for treating Generator as an opaque reference type. Add a PyObject* weakrefs field to THPGenerator, set tp_weaklistoffset, initialize the field in all constructors, and clear weak refs in dealloc. This follows the same pattern used for torch.Stream (#164304) and torch.Event (#164522). <!-- ps-id: d542629c-9c69-49bd-ac66-a6569e111771 -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames @Lucaskabela