-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[SymmMem] Add NVSHMEM Fence support to Triton #156474
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
[SymmMem] Add NVSHMEM Fence support to Triton #156474
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/156474
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ce21940 with merge base ef6d2ce ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@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 |
This PR introduces device-side NVSHMEM completion guarantees via the quiet API in Triton, enabling GPU kernels to ensure all pending remote memory operations are fully complete before proceeding with subsequent operations. Changes: - Added a new `core.extern` wrapper for `nvshmem_quiet` in `nvshmem_triton.py` - Implemented `test_triton_quiet` in `test/distributed/test_nvshmem.py`, including: - A Triton kernel that performs `putmem_block` followed by `quiet()` to ensure completion - Flag-based signaling only after `quiet()` completes, guaranteeing data delivery - Consumer validation that when the completion flag arrives, all data transfers are guaranteed complete Tests: `$ TORCH_SYMMMEM=NVSHMEM python test/distributed/test_nvshmem.py -k test_triton_quiet` Pull Request resolved: #156475 Approved by: https://github.com/kwen2501 ghstack dependencies: #156472, #156473, #156474
This PR introduces device-side NVSHMEM memory ordering via the fence API in Triton, enabling GPU kernels to enforce completion and ordering of remote memory operations before subsequent operations proceed.
Changes:
core.extern
wrapper fornvshmem_fence
innvshmem_triton.py
test_triton_fence
intest/distributed/test_nvshmem.py
, including:putmem_block
operations separated byfence()
callsTests:
$ TORCH_SYMMMEM=NVSHMEM python test/distributed/test_nvshmem.py -k test_triton_fence
Stack from ghstack (oldest at bottom):
cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k