Skip to main content

Crate baracuda_nccl_sys

Crate baracuda_nccl_sys 

Source
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.
ncclRedOp_t
NCCL reduction operation. Modeled as a transparent newtype rather than a closed enum because PFN_ncclRedOpCreatePreMulSum returns custom op IDs (≥ 5) that don’t fit a closed Rust enum.
ncclResult_t
Return code from an NCCL call.
ncclUniqueId
A 128-byte unique identifier for multi-process NCCL initialization.

Enums§

ncclDataType_t
NCCL element data type.

Functions§

nccl
Return the lazily-loaded NCCL library accessor.

Type Aliases§

PFN_ncclAllGather
Function-pointer type for ncclAllGather (all-gather collective). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclAllReduce
Function-pointer type for ncclAllReduce (all-reduce collective). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclBroadcast
Function-pointer type for ncclBroadcast (broadcast-from-root collective). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclCommAbort
Function-pointer type for ncclCommAbort (abort outstanding ops on a communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclCommCount
Function-pointer type for ncclCommCount (query rank count on a communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclCommCuDevice
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_ncclCommDeregister
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_ncclCommDestroy
Function-pointer type for ncclCommDestroy (destroy a communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclCommFinalize
Function-pointer type for ncclCommFinalize (finalize a non-blocking communicator). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclCommGetAsyncError
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_ncclCommInitAll
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_ncclCommInitRank
Function-pointer type for ncclCommInitRank (initialize a communicator rank). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclCommInitRankConfig
Function-pointer type for ncclCommInitRankConfig (initialize a communicator rank with config). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclCommRegister
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_ncclCommSplit
Function-pointer type for ncclCommSplit (split a communicator by color/key). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclCommUserRank
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_ncclGetErrorString
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_ncclGetLastError
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_ncclGetUniqueId
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_ncclGetVersion
Function-pointer type for ncclGetVersion (query NCCL library version). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclGroupEnd
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_ncclGroupStart
Function-pointer type for ncclGroupStart (start grouped collective ops). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclMemAlloc
Function-pointer type for ncclMemAlloc (allocate NCCL-registered device memory). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclMemFree
Function-pointer type for ncclMemFree (free NCCL-registered device memory). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclRecv
Function-pointer type for ncclRecv (point-to-point receive). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclRedOpCreatePreMulSum
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_ncclRedOpDestroy
Function-pointer type for ncclRedOpDestroy (destroy a custom reduction op). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclReduce
Function-pointer type for ncclReduce (reduce-to-root collective). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclReduceScatter
Function-pointer type for ncclReduceScatter (reduce-scatter collective). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
PFN_ncclSend
Function-pointer type for ncclSend (point-to-point send). See https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api.html.
ncclComm_t
Opaque NCCL communicator.