Expand description
Raw FFI + dynamic loader for NVIDIA NCCL (multi-GPU collective communication).
baracuda-nccl wraps this with a safe, typed API. Use this crate
directly only if you need a function that the safe layer hasn’t
wrapped yet (in which case please file a bug).
NCCL is primarily a Linux library; Windows support landed in later NCCL
versions but is uncommon. This crate compiles everywhere and defers the
“is NCCL actually installed?” question to runtime — nccl() returns
LoaderError::LibraryNotFound on hosts without NCCL.
Structs§
- Nccl
- Lazily-resolved NCCL function-pointer table.
- nccl
RedOp_ t - NCCL reduction operation. Modeled as a transparent newtype rather
than a closed enum because
PFN_ncclRedOpCreatePreMulSumreturns custom op IDs (≥ 5) that don’t fit a closed Rust enum. - nccl
Result_ t - Return code from an NCCL call.
- nccl
Unique Id - A 128-byte unique identifier for multi-process NCCL initialization.
Enums§
- nccl
Data Type_ t - NCCL element data type.
Functions§
- nccl
- Return the lazily-loaded NCCL library accessor.
Type Aliases§
- PFN_
nccl AllGather - Function-pointer type for
ncclAllGather(all-gather collective). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl AllReduce - Function-pointer type for
ncclAllReduce(all-reduce collective). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Broadcast - Function-pointer type for
ncclBroadcast(broadcast-from-root collective). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm Abort - Function-pointer type for
ncclCommAbort(abort outstanding ops on a communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm Count - Function-pointer type for
ncclCommCount(query rank count on a communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm CuDevice - Function-pointer type for
ncclCommCuDevice(query CUDA device backing a communicator rank). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm Deregister - Function-pointer type for
ncclCommDeregister(deregister a user buffer from a communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm Destroy - Function-pointer type for
ncclCommDestroy(destroy a communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm Finalize - Function-pointer type for
ncclCommFinalize(finalize a non-blocking communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm GetAsync Error - Function-pointer type for
ncclCommGetAsyncError(fetch a communicator’s last async error). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm Init All - Function-pointer type for
ncclCommInitAll(initialize all-local-GPU communicators in one call). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm Init Rank - Function-pointer type for
ncclCommInitRank(initialize a communicator rank). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm Init Rank Config - Function-pointer type for
ncclCommInitRankConfig(initialize a communicator rank with config). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm Register - Function-pointer type for
ncclCommRegister(register a user buffer with a communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm Split - Function-pointer type for
ncclCommSplit(split a communicator by color/key). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Comm User Rank - Function-pointer type for
ncclCommUserRank(query this rank’s index on a communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl GetError String - Function-pointer type for
ncclGetErrorString(decode an ncclResult_t into a static C string). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl GetLast Error - Function-pointer type for
ncclGetLastError(fetch the last error string on a communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl GetUnique Id - Function-pointer type for
ncclGetUniqueId(generate a unique multi-rank initialization ID). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl GetVersion - Function-pointer type for
ncclGetVersion(query NCCL library version). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Group End - Function-pointer type for
ncclGroupEnd(end grouped collective ops and commit them). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Group Start - Function-pointer type for
ncclGroupStart(start grouped collective ops). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl MemAlloc - Function-pointer type for
ncclMemAlloc(allocate NCCL-registered device memory). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl MemFree - Function-pointer type for
ncclMemFree(free NCCL-registered device memory). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Recv - Function-pointer type for
ncclRecv(point-to-point receive). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl RedOp Create PreMul Sum - Function-pointer type for
ncclRedOpCreatePreMulSum(create a custom pre-multiplied-sum reduction op). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl RedOp Destroy - Function-pointer type for
ncclRedOpDestroy(destroy a custom reduction op). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Reduce - Function-pointer type for
ncclReduce(reduce-to-root collective). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Reduce Scatter - Function-pointer type for
ncclReduceScatter(reduce-scatter collective). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - PFN_
nccl Send - Function-pointer type for
ncclSend(point-to-point send). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html. - nccl
Comm_ t - Opaque NCCL communicator.