Skip to content

[user-streams] Make device-agnostic streams weakref compatible - #164304

Closed
mlazos wants to merge 21 commits into
gh/mlazos/29/basefrom
gh/mlazos/29/head
Closed

mlazos wants to merge 21 commits into
gh/mlazos/29/basefrom
gh/mlazos/29/head

Conversation

@pytorch-bot

pytorch-bot Bot commented Sep 30, 2025 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/164304

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit 58012d9 with merge base fa560e1 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

mlazos added a commit that referenced this pull request Oct 1, 2025
ghstack-source-id: a7555d7
Pull Request resolved: #164304
mlazos added a commit that referenced this pull request Oct 2, 2025
ghstack-source-id: a7555d7
Pull Request resolved: #164304
@mlazos
mlazos requested a review from anijain2305 October 2, 2025 21:23
@mlazos mlazos changed the title [user-streams] Make cuda streams weakref compatible [user-streams] Make device-agnostic streams weakref compatible Oct 2, 2025
mlazos added a commit that referenced this pull request Oct 2, 2025
ghstack-source-id: 8cd59a0
Pull Request resolved: #164304
mlazos added a commit that referenced this pull request Oct 2, 2025
ghstack-source-id: 8cd59a0
Pull Request resolved: #164304
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@mlazos your PR has been successfully reverted.

@pytorchmergebot pytorchmergebot added Reverted ci-no-td Do not run TD on this PR labels Oct 29, 2025
mlazos added a commit that referenced this pull request Oct 29, 2025
ghstack-source-id: 69fe85a
Pull Request resolved: #164304
mlazos added a commit that referenced this pull request Oct 29, 2025
ghstack-source-id: 69fe85a
Pull Request resolved: #164304
[ghstack-poisoned]
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #164522

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
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants