Avoid RMA proxy when cuMem host is unavailable#2253
Open
jm99k56 wants to merge 1 commit into
Open
Conversation
Guard CPU-accessible allocations with GDRCopy or cuMem host support. Signed-off-by: Lucas Wong <lucaswongchn@gmail.com>
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.
Guard CPU-accessible allocations with GDRCopy or cuMem host support.
Description
RMA proxy control buffers are allocated through
allocMemCPUAccessible().That helper uses GDRCopy when available, otherwise it falls back to
ncclCuMemHostAlloc().When cuMem host allocations fail the runtime self-test, the SHM path falls
back to
/dev/shm, but the RMA proxy path could still callncclCuMemHostAlloc()and later fail incuMemCreate(HOST_NUMA).This PR adds a shared CPU-accessible memory capability check and uses it to
avoid enabling multi-LSA RMA proxy when neither GDRCopy nor cuMem host
allocations are available. It also adds a defensive guard in
allocMemCPUAccessible().Related Issues
none
Changes & Impact
ncclCpuAccessibleMemSupported()for GDRCopy/cuMem-host-backedCPU-accessible control memory.
unavailable.
allocMemCPUAccessible()from falling through toncclCuMemHostAlloc()after cuMem host support has been disabled.In unsupported environments, host RMA proxy is now reported as unsupported
instead of failing later with CUDA
invalid argument.Performance Impact
No performance impact is expected for supported paths.
Existing behavior is preserved when either GDRCopy or cuMem host allocations
are available. The change only gates unsupported RMA proxy configurations and
adds a defensive allocation check.