Add get_nvlink_address() to device window API and Triton bindings#1012
Open
siyengar wants to merge 1 commit intometa-pytorch:mainfrom
Open
Add get_nvlink_address() to device window API and Triton bindings#1012siyengar wants to merge 1 commit intometa-pytorch:mainfrom
siyengar wants to merge 1 commit intometa-pytorch:mainfrom
Conversation
Contributor
siyengar
added a commit
to siyengar/torchcomms-2
that referenced
this pull request
Mar 10, 2026
…ta-pytorch#1012) Summary: Add get_nvlink_address() method to TorchCommWindowNCCLX that returns the NVLink-mapped device pointer for a peer's window memory. This calls ncclGetPeerDevicePointer (host-side, NCCLX 2.29+ when available) to resolve the LSA flat address for NVLink-accessible peers, returning nullptr for peers not reachable via NVLink. The API guard is set at NCCLX 2.28+ with a nested 2.29+ check for the actual host API call, falling back to returning nullptr on 2.28.x. Also add torchcomms_get_nvlink_address() to the Triton device bindings, which calls ncclGetPeerPointer() (device-side, available in 2.28+) to compute the NVLink address directly on the GPU. Changes: - NcclxApi: Add winGetPeerDevicePointer() virtual method (v2.28+ guard, v2.29+ actual call) - TorchCommWindowNCCLX: Add get_nvlink_address(peer, offset) method - torchcomms_device.h/.cu: Add torchcomms_get_nvlink_address extern - Triton Python wrapper: Add get_nvlink_address() function - Pybind: Register get_nvlink_address (v2.28+ only) - Type stubs: Add get_nvlink_address signature Reviewed By: goelayu Differential Revision: D95908486
…ta-pytorch#1012) Summary: Add get_nvlink_address() method to TorchCommWindowNCCLX that returns the NVLink-mapped device pointer for a peer's window memory. This calls ncclGetPeerDevicePointer (host-side, NCCLX 2.29+ when available) to resolve the LSA flat address for NVLink-accessible peers, returning nullptr for peers not reachable via NVLink. The API guard is set at NCCLX 2.28+ with a nested 2.29+ check for the actual host API call, falling back to returning nullptr on 2.28.x. Also add torchcomms_get_nvlink_address() to the Triton device bindings, which calls ncclGetPeerPointer() (device-side, available in 2.28+) to compute the NVLink address directly on the GPU. Changes: - NcclxApi: Add winGetPeerDevicePointer() virtual method (v2.28+ guard, v2.29+ actual call) - TorchCommWindowNCCLX: Add get_nvlink_address(peer, offset) method - torchcomms_device.h/.cu: Add torchcomms_get_nvlink_address extern - Triton Python wrapper: Add get_nvlink_address() function - Pybind: Register get_nvlink_address (v2.28+ only) - Type stubs: Add get_nvlink_address signature Reviewed By: goelayu Differential Revision: D95908486
b7226a2 to
de563fe
Compare
siyengar
added a commit
to siyengar/torchcomms-2
that referenced
this pull request
Mar 11, 2026
…ta-pytorch#1012) Summary: Add get_nvlink_address() method to TorchCommWindowNCCLX that returns the NVLink-mapped device pointer for a peer's window memory. This calls ncclGetPeerDevicePointer (host-side, NCCLX 2.29+ when available) to resolve the LSA flat address for NVLink-accessible peers, returning nullptr for peers not reachable via NVLink. The API guard is set at NCCLX 2.28+ with a nested 2.29+ check for the actual host API call, falling back to returning nullptr on 2.28.x. Also add torchcomms_get_nvlink_address() to the Triton device bindings, which calls ncclGetPeerPointer() (device-side, available in 2.28+) to compute the NVLink address directly on the GPU. Changes: - NcclxApi: Add winGetPeerDevicePointer() virtual method (v2.28+ guard, v2.29+ actual call) - TorchCommWindowNCCLX: Add get_nvlink_address(peer, offset) method - torchcomms_device.h/.cu: Add torchcomms_get_nvlink_address extern - Triton Python wrapper: Add get_nvlink_address() function - Pybind: Register get_nvlink_address (v2.28+ only) - Type stubs: Add get_nvlink_address signature Reviewed By: goelayu Differential Revision: D95908486
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.
Summary:
Add get_nvlink_address() method to TorchCommWindowNCCLX that returns the
NVLink-mapped device pointer for a peer's window memory. This calls
ncclGetPeerDevicePointer (host-side, NCCLX 2.29+ when available) to resolve
the LSA flat address for NVLink-accessible peers, returning nullptr for peers
not reachable via NVLink. The API guard is set at NCCLX 2.28+ with a nested
2.29+ check for the actual host API call, falling back to returning nullptr
on 2.28.x.
Also add torchcomms_get_nvlink_address() to the Triton device bindings,
which calls ncclGetPeerPointer() (device-side, available in 2.28+) to
compute the NVLink address directly on the GPU.
Changes:
Differential Revision: D95908486