pub unsafe fn nccl_mem_alloc(size: usize) -> Result<*mut c_void>Expand description
Allocate GPU memory backed by a symmetric memory window across the
communicator. NCCL 2.28+ only — older NCCL returns InvalidArgument.
Buffers from ncclMemAlloc enable copy-engine collectives over NVLink
and the device-side communication API. On Atlas’s 2-rank Spark over
RoCE, the copy-engine offload is unavailable (RoCE != NVLink), but the
symmetric windows are required to compose with device-API fused kernels
(TokenWeave-style AR+RMSNorm).
§Safety
The returned pointer must be freed via nccl_mem_free. Passing the
pointer to non-NCCL allocators (e.g. cudaFree) is undefined behavior.