Skip to content

Conversation

kwen2501
Copy link
Contributor

@kwen2501 kwen2501 commented Sep 18, 2025

Stack from ghstack (oldest at bottom):

As titled. Avoiding a potential hang when running dispatch and combine in subgroups.

The rest is just re-arrange of the tests to create a sub-group test class. (no substantial change)

cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @ezyang @msaroufim @dcci

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Sep 18, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit ce9d19b with merge base 4840a1a (image):
💚 Looks good so far! There are no failures yet. 💚

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

[ghstack-poisoned]
@kwen2501 kwen2501 added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 19, 2025
@kwen2501
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #162680

pytorchmergebot pushed a commit that referenced this pull request Sep 19, 2025
Problem:
Without MemPool it looks like nvshmem backend never deallocates memory.

Cause:
Handles in `symm_mems_` (a map) keeps reference to memory allocations.

Solution:
- Remove reference to allocation from handles -- the reference is never used anyway.
- Use `unique_ptr` instead of `shared_ptr` to wrap allocation to ensure single ownership.

Pull Request resolved: #162680
Approved by: https://github.com/ezyang
ghstack dependencies: #163298
@kwen2501
Copy link
Contributor Author

@pytorchbot cherry-pick --onto release/2.9 -c critical

pytorchbot pushed a commit that referenced this pull request Sep 19, 2025
Problem:
Without MemPool it looks like nvshmem backend never deallocates memory.

Cause:
Handles in `symm_mems_` (a map) keeps reference to memory allocations.

Solution:
- Remove reference to allocation from handles -- the reference is never used anyway.
- Use `unique_ptr` instead of `shared_ptr` to wrap allocation to ensure single ownership.

Pull Request resolved: #162680
Approved by: https://github.com/ezyang
ghstack dependencies: #163298

(cherry picked from commit 7130b17)
pytorchbot pushed a commit that referenced this pull request Sep 19, 2025
As titled. Avoiding a potential hang when running dispatch and combine in subgroups.

The rest is just re-arrange of the tests to create a sub-group test class. (no substantial change)

Pull Request resolved: #163298
Approved by: https://github.com/fegin

(cherry picked from commit f8fb437)
@pytorchbot
Copy link
Collaborator

Cherry picking #163298

The cherry pick PR is at #163376 and it is recommended to link a critical cherry pick PR with an issue. The following tracker issues are updated:

Details for Dev Infra team Raised by workflow job

mansiag05 pushed a commit to mansiag05/pytorch that referenced this pull request Sep 22, 2025
As titled. Avoiding a potential hang when running dispatch and combine in subgroups.

The rest is just re-arrange of the tests to create a sub-group test class. (no substantial change)

Pull Request resolved: pytorch#163298
Approved by: https://github.com/fegin
mansiag05 pushed a commit to mansiag05/pytorch that referenced this pull request Sep 22, 2025
Problem:
Without MemPool it looks like nvshmem backend never deallocates memory.

Cause:
Handles in `symm_mems_` (a map) keeps reference to memory allocations.

Solution:
- Remove reference to allocation from handles -- the reference is never used anyway.
- Use `unique_ptr` instead of `shared_ptr` to wrap allocation to ensure single ownership.

Pull Request resolved: pytorch#162680
Approved by: https://github.com/ezyang
ghstack dependencies: pytorch#163298
cleonard530 pushed a commit to cleonard530/pytorch that referenced this pull request Sep 22, 2025
As titled. Avoiding a potential hang when running dispatch and combine in subgroups.

The rest is just re-arrange of the tests to create a sub-group test class. (no substantial change)

Pull Request resolved: pytorch#163298
Approved by: https://github.com/fegin
cleonard530 pushed a commit to cleonard530/pytorch that referenced this pull request Sep 22, 2025
Problem:
Without MemPool it looks like nvshmem backend never deallocates memory.

Cause:
Handles in `symm_mems_` (a map) keeps reference to memory allocations.

Solution:
- Remove reference to allocation from handles -- the reference is never used anyway.
- Use `unique_ptr` instead of `shared_ptr` to wrap allocation to ensure single ownership.

Pull Request resolved: pytorch#162680
Approved by: https://github.com/ezyang
ghstack dependencies: pytorch#163298
dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request Sep 26, 2025
As titled. Avoiding a potential hang when running dispatch and combine in subgroups.

The rest is just re-arrange of the tests to create a sub-group test class. (no substantial change)

Pull Request resolved: pytorch#163298
Approved by: https://github.com/fegin
dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request Sep 26, 2025
Problem:
Without MemPool it looks like nvshmem backend never deallocates memory.

Cause:
Handles in `symm_mems_` (a map) keeps reference to memory allocations.

Solution:
- Remove reference to allocation from handles -- the reference is never used anyway.
- Use `unique_ptr` instead of `shared_ptr` to wrap allocation to ensure single ownership.

Pull Request resolved: pytorch#162680
Approved by: https://github.com/ezyang
ghstack dependencies: pytorch#163298
Camyll pushed a commit that referenced this pull request Sep 26, 2025
[SymmMem] Fix memory allocation hold-up (#162680)

Problem:
Without MemPool it looks like nvshmem backend never deallocates memory.

Cause:
Handles in `symm_mems_` (a map) keeps reference to memory allocations.

Solution:
- Remove reference to allocation from handles -- the reference is never used anyway.
- Use `unique_ptr` instead of `shared_ptr` to wrap allocation to ensure single ownership.

Pull Request resolved: #162680
Approved by: https://github.com/ezyang
ghstack dependencies: #163298

(cherry picked from commit 7130b17)

Co-authored-by: Ke Wen <kw2501@meta.com>
Camyll pushed a commit that referenced this pull request Sep 26, 2025
[SymmMem] Barrier on team instead of world (#163298)

As titled. Avoiding a potential hang when running dispatch and combine in subgroups.

The rest is just re-arrange of the tests to create a sub-group test class. (no substantial change)

Pull Request resolved: #163298
Approved by: https://github.com/fegin

(cherry picked from commit f8fb437)

Co-authored-by: Ke Wen <kw2501@meta.com>
@github-actions github-actions bot deleted the gh/kwen2501/254/head branch October 20, 2025 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/h100-symm-mem ciflow/trunk Trigger trunk jobs on your pull request Merged oncall: distributed Add this issue/PR to distributed oncall triage queue release notes: distributed (c10d) release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants