rocm.bindings.rccl#
2026-09-24
46 min read time
Advanced Micro Devices, Inc.
Attributes#
Classes#
(No short description) |
|
(No short description) |
|
Opaque unique id used to initialize communicators |
|
Result type |
|
Communicator configuration |
|
(No short description) |
|
Communicator memory statistic selector |
|
Dummy reduction enumeration |
|
Reduction operation selector |
|
Data types |
|
Location and dereferencing logic for scalar arguments. |
|
(No short description) |
|
(No short description) |
Functions#
|
|
|
NCCL malloc and free function for all types of NCCL optimizations |
|
(No short description, might be part of a group.) |
Return the RCCL_VERSION_CODE of RCCL in the supplied integer. |
|
Generates an ID for ncclCommInitRank. |
|
|
Create a new communicator with config. |
|
Creates a new communicator (multi thread/process version). |
|
Creates a clique of communicators (single process version). |
|
Finalize a communicator. |
|
Frees local resources associated with communicator object. |
|
Abort any in-progress calls and destroy the communicator object. |
|
Revoke a communicator without destroying it. |
|
Create one or more communicators from an existing one. |
|
Shrink existing communicator. |
|
Generate a per-communicator unique ID for growing a communicator. |
|
Grow a communicator by adding new ranks. |
|
Creates a new communicator (multi thread/process version), similar to ncclCommInitRankConfig. |
|
Returns a string for each result code. |
|
Returns a human-readable message of the last error that occurred. |
Reload environment variables that determine logging. |
|
|
Checks whether the comm has encountered any asynchronous errors |
|
Gets the number of ranks in the communicator clique. |
|
Get the ROCm device index associated with a communicator |
|
Get the rank associated with a communicator |
|
Register CUDA buffer for zero-copy operation |
|
Deregister CUDA buffer |
|
Suspend communicator operations to free resources. |
|
Resume a previously suspended communicator. |
|
Query communicator memory statistics. |
|
Register memory window |
|
Deregister symmetric memory |
|
Get the user pointer from the window |
|
Create a custom pre-multiplier reduction operator |
|
Destroy custom reduction operator |
|
Reduce |
|
(Deprecated) Broadcast (in-place) |
|
Broadcast |
|
All-Reduce |
|
All-Reduce-with-Bias |
|
Reduce-Scatter |
|
All-Gather |
|
All-to-All |
|
All-To-Allv |
|
Gather |
|
Scatter |
|
All-To-All |
|
All-To-Allv |
|
Send |
|
Receive |
|
Put |
|
Signal |
|
Wait Signal |
Group Start |
|
Group End |
|
|
Group Simulate End |
Look up the parameter identified by key and store a handle to it in |
|
Read the value of the parameter bound to h as the type of out. |
|
(No short description, might be part of a group.) |
|
(No short description, might be part of a group.) |
|
(No short description, might be part of a group.) |
|
(No short description, might be part of a group.) |
|
(No short description, might be part of a group.) |
|
(No short description, might be part of a group.) |
|
(No short description, might be part of a group.) |
|
|
Read the value of the parameter bound to h as a string. |
|
Read the value of the parameter bound to h as raw binary data. |
|
Get parameter value as string by key. |
|
Get all registered parameter keys. |
Dump all parameters to log output. |
Module Contents#
- rocm.bindings.rccl.NCCL_MAJOR: Any#
- rocm.bindings.rccl.NCCL_MINOR: Any#
- rocm.bindings.rccl.NCCL_PATCH: Any#
- rocm.bindings.rccl.NCCL_SUFFIX: Any#
- rocm.bindings.rccl.NCCL_VERSION_CODE: Any#
- rocm.bindings.rccl.RCCL_BFLOAT16: Any#
- rocm.bindings.rccl.RCCL_GATHER_SCATTER: Any#
- rocm.bindings.rccl.RCCL_ALLTOALLV: Any#
- rocm.bindings.rccl.NCCL_UNIQUE_ID_BYTES: Any#
- class rocm.bindings.rccl.ncclComm(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.rccl.ncclComm_t#
- class rocm.bindings.rccl.ncclWindow_vidmem(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.rccl.ncclWindow_t#
- class rocm.bindings.rccl.ncclUniqueId(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerOpaque unique id used to initialize communicators
The ncclUniqueId must be passed to all participating ranks
- internal: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.rccl.ncclResult_t#
Bases:
enum.IntEnumResult type
Return codes aside from ncclSuccess indicate that a call has failed
- class rocm.bindings.rccl.ncclConfig_v22800(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerCommunicator configuration
Users can assign value to attributes to specify the behavior of a communicator
- size: Any#
- magic: Any#
- version: Any#
- blocking: Any#
- cgaClusterSize: Any#
- minCTAs: Any#
- maxCTAs: Any#
- netName: Any#
- trafficClass: Any#
- commName: Any#
- collnetEnable: Any#
- CTAPolicy: Any#
- nvlsCTAs: Any#
- nChannelsPerNetPeer: Any#
- nvlinkCentricSched: Any#
- graphUsageMode: Any#
- numRmaCtx: Any#
- maxP2pPeers: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- rocm.bindings.rccl.ncclConfig_t#
- class rocm.bindings.rccl.ncclSimInfo_v22200(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- size: Any#
- magic: Any#
- version: Any#
- estimatedTime: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- rocm.bindings.rccl.ncclSimInfo_t#
- rocm.bindings.rccl.ncclMemAlloc(size)#
NCCL malloc and free function for all types of NCCL optimizations (e.g.
user buffer registration). The actual allocated size might be larger than requested due to granularity requirement.
- Args:
- size (
int): (undocumented)
- size (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclMemAlloc(void ** ptr, size_t size)
- rocm.bindings.rccl.ncclMemFree(ptr)#
(No short description, might be part of a group.)
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclMemFree(void * ptr)
- rocm.bindings.rccl.ncclGetVersion()#
Return the RCCL_VERSION_CODE of RCCL in the supplied integer.
This integer is coded with the MAJOR, MINOR and PATCH level of RCCL.
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.int:Pointer to where version will be stored
C signature
ncclResult_t ncclGetVersion(int * version)
- rocm.bindings.rccl.ncclGetUniqueId()#
Generates an ID for ncclCommInitRank.
Generates an ID to be used in ncclCommInitRank. ncclGetUniqueId should be called once by a single rank and the ID should be distributed to all ranks in the communicator before using it as a parameter for ncclCommInitRank.
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.ncclUniqueId:Pointer to where uniqueId will be stored
C signature
ncclResult_t ncclGetUniqueId(ncclUniqueId * uniqueId)
- rocm.bindings.rccl.ncclCommInitRankConfig(nranks, commId, rank, config)#
Create a new communicator with config.
Create a new communicator (multi thread/process version) with a configuration set by users. See
rccl_config_typefor more details. Each rank is associated to a CUDA device, which has to be set before calling ncclCommInitRank.- Args:
- nranks (
int) – IN: Total number of ranks participating in this communicator
- commId (
ncclUniqueId) – IN: UniqueId required for initialization
- rank (
int) – IN: Current rank to create communicator for. [0 to nranks-1]
- config (
ncclConfig_v22800/object) – IN: Pointer to communicator configuration
- nranks (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.ncclComm:Pointer to created communicator
C signature
ncclResult_t ncclCommInitRankConfig(ncclComm_t * comm, int nranks, ncclUniqueId commId, int rank, ncclConfig_t * config)
- rocm.bindings.rccl.ncclCommInitRank(nranks, commId, rank)#
Creates a new communicator (multi thread/process version).
Rank must be between 0 and nranks-1 and unique within a communicator clique. Each rank is associated to a CUDA device, which has to be set before calling ncclCommInitRank. ncclCommInitRank implicitly syncronizes with other ranks, so it must be called by different threads/processes or use ncclGroupStart/ncclGroupEnd.
- Args:
- nranks (
int) – IN: Total number of ranks participating in this communicator
- commId (
ncclUniqueId) – IN: UniqueId required for initialization
- rank (
int) – IN: Current rank to create communicator for
- nranks (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.ncclComm:Pointer to created communicator
C signature
ncclResult_t ncclCommInitRank(ncclComm_t * comm, int nranks, ncclUniqueId commId, int rank)
- rocm.bindings.rccl.ncclCommInitAll(comm, ndev, devlist)#
Creates a clique of communicators (single process version).
This is a convenience function to create a single-process communicator clique. Returns an array of ndev newly initialized communicators in comm. comm should be pre-allocated with size at least ndev*sizeof(ncclComm_t). If devlist is NULL, the first ndev HIP devices are used. Order of devlist defines user-order of processors within the communicator.
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclCommInitAll(ncclComm_t * comm, int ndev, const int * devlist)
- rocm.bindings.rccl.ncclCommFinalize(comm)#
Finalize a communicator.
ncclCommFinalize flushes all issued communications and marks communicator state as ncclInProgress. The state will change to ncclSuccess when the communicator is globally quiescent and related resources are freed; then, calling ncclCommDestroy can locally free the rest of the resources (e.g. communicator itself) without blocking.
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclCommFinalize(ncclComm_t comm)
- rocm.bindings.rccl.ncclCommDestroy(comm)#
Frees local resources associated with communicator object.
Destroy all local resources associated with the passed in communicator object
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclCommDestroy(ncclComm_t comm)
- rocm.bindings.rccl.ncclCommAbort(comm)#
Abort any in-progress calls and destroy the communicator object.
Frees resources associated with communicator object and aborts any operations that might still be running on the device.
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclCommAbort(ncclComm_t comm)
- rocm.bindings.rccl.ncclCommRevoke(comm, revokeFlags)#
Revoke a communicator without destroying it.
Aborts in-flight collectives by raising the comm’s abort flag, stops the proxy service, and rejects subsequently enqueued collectives with ncclInvalidUsage. The abort flag is cleared once the asynchronous revoke job completes, so the communicator remains valid as a parent for ncclCommSplit / ncclCommShrink / ncclCommGrow, and may be torn down via ncclCommDestroy / ncclCommAbort. Because in-flight collectives are aborted (not drained), revoke can recover from peers that have failed mid-collective; output buffers of an aborted collective contain undefined data. ncclCommFinalize on a revoked communicator is invalid and returns ncclInvalidUsage. Pass NCCL_REVOKE_DEFAULT for revokeFlags; other values are rejected with ncclInvalidArgument.
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclCommRevoke(ncclComm_t comm, int revokeFlags)
- rocm.bindings.rccl.ncclCommSplit(comm, color, key, config)#
Create one or more communicators from an existing one.
Creates one or more communicators from an existing one. Ranks with the same color will end up in the same communicator. Within the new communicator, key will be used to order ranks. NCCL_SPLIT_NOCOLOR as color will indicate the rank will not be part of any group and will therefore return a NULL communicator. If config is NULL, the new communicator will inherit the original communicator’s configuration
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.ncclComm:Pointer to new communicator
C signature
ncclResult_t ncclCommSplit(ncclComm_t comm, int color, int key, ncclComm_t * newcomm, ncclConfig_t * config)
- rocm.bindings.rccl.ncclCommShrink(comm, excludeRanksCount, config, shrinkFlags)#
Shrink existing communicator.
Ranks in excludeRanksList will be removed form the existing communicator. Within the new communicator, ranks will be re-ordered to fill the gap of removed ones. If config is NULL, the new communicator will inherit the original communicator’s configuration. The flag enables NCCL to adapt to various states of the parent communicator, see NCCL_SHRINK flags.
- Args:
- comm (
ncclComm/object) – IN: Original communicator object for this rank
- excludeRanksCount (
int) – IN: Number of ranks to be excluded
- config (
ncclConfig_v22800/object) – IN: Config file for new communicator. May be NULL to inherit from comm
- shrinkFlags (
int) – IN: Flag to adapt to various states of the parent communicator (see NCCL_SHRINK flags)
- comm (
- Returns:
A
tupleof size 3 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.int:List of ranks to be exluded
ncclComm:Pointer to new communicator
C signature
ncclResult_t ncclCommShrink(ncclComm_t comm, int * excludeRanksList, int excludeRanksCount, ncclComm_t * newcomm, ncclConfig_t * config, int shrinkFlags)
- rocm.bindings.rccl.ncclCommGetUniqueId(comm)#
Generate a per-communicator unique ID for growing a communicator.
Generates a unique ID on an existing communicator. The ID must be distributed to the ranks joining through ncclCommGrow. Constraints: - A new ID cannot be generated while a previous ID is unconsumed. - Each ID can only be used once (no reuse after consumption). - The grow operation must complete before calling this again.
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.ncclUniqueId:Pointer to the generated unique ID
C signature
ncclResult_t ncclCommGetUniqueId(ncclComm_t comm, ncclUniqueId * uniqueId)
- rocm.bindings.rccl.ncclCommGrow(comm, nRanks, uniqueId, rank, config)#
Grow a communicator by adding new ranks.
Creates a larger communicator from an existing one plus newly joining ranks. The unique ID obtained from ncclCommGetUniqueId must be distributed to the new ranks. Parameter usage: - Existing non-root ranks: comm set, uniqueId = NULL, rank = -1 - Existing root rank: comm set, uniqueId = &id, rank = -1 - New ranks: comm = NULL, uniqueId = &id, rank = assigned The unique ID is consumed upon a successful grow and cannot be reused. If config is NULL, the new communicator inherits the original communicator’s configuration.
- Args:
- comm (
ncclComm/object) – IN: Existing communicator, or NULL for newly joining ranks
- nRanks (
int) – IN: Total number of ranks in the new communicator
- uniqueId (
ncclUniqueId/object) – IN: Unique ID from ncclCommGetUniqueId; NULL on existing non-root ranks
- rank (
int) – IN: Rank in the new communicator for joining ranks; -1 for existing ranks
- config (
ncclConfig_v22800/object) – IN: Config for the new communicator. May be NULL to inherit from comm
- comm (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.ncclComm:Pointer to the new communicator
C signature
ncclResult_t ncclCommGrow(ncclComm_t comm, int nRanks, const ncclUniqueId * uniqueId, int rank, ncclComm_t * newcomm, ncclConfig_t * config)
- rocm.bindings.rccl.ncclCommInitRankScalable(nranks, myrank, nId, commIds, config)#
Creates a new communicator (multi thread/process version), similar to ncclCommInitRankConfig.
Allows to use more than one ncclUniqueId (up to one per rank), indicated by nId, to accelerate the init operation. The number of ncclUniqueIds and their order must be the same for every rank.
- Args:
- nranks (
int) – IN: Total number of ranks participating in this communicator
- myrank (
int) – IN: Current rank
- nId (
int) – IN: Number of unique IDs
- commIds (
ncclUniqueId/object) – IN: List of unique IDs
- config (
ncclConfig_v22800/object) – IN: Config file for new communicator. May be NULL to inherit from comm
- nranks (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.ncclComm:Pointer to new communicator
C signature
ncclResult_t ncclCommInitRankScalable(ncclComm_t * newcomm, int nranks, int myrank, int nId, ncclUniqueId * commIds, ncclConfig_t * config)
- rocm.bindings.rccl.ncclGetErrorString(result)#
Returns a string for each result code.
Returns a human-readable string describing the given result code.
- Args:
- result (
ncclResult_t) – IN: Result code to get description for
- result (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t:Always returns
ncclSuccess.
bytes: String containing description of result code.
C signature
const char * ncclGetErrorString(ncclResult_t result)
- rocm.bindings.rccl.ncclGetLastError(comm)#
Returns a human-readable message of the last error that occurred.
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t:Always returns
ncclSuccess.
bytes: (undocumented)
C signature
const char * ncclGetLastError(ncclComm_t comm)
- rocm.bindings.rccl.ncclResetDebugInit()#
Reload environment variables that determine logging.
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t:Always returns
ncclSuccess.
C signature
void ncclResetDebugInit()
- rocm.bindings.rccl.ncclCommGetAsyncError(comm, asyncError)#
Checks whether the comm has encountered any asynchronous errors
Query whether the provided communicator has encountered any asynchronous errors
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclCommGetAsyncError(ncclComm_t comm, ncclResult_t * asyncError)
- rocm.bindings.rccl.ncclCommCount(comm)#
Gets the number of ranks in the communicator clique.
Returns the number of ranks in the communicator clique (as set during initialization)
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.int:Pointer to where number of ranks will be stored
C signature
ncclResult_t ncclCommCount(const ncclComm_t comm, int * count)
- rocm.bindings.rccl.ncclCommCuDevice(comm)#
Get the ROCm device index associated with a communicator
Returns the ROCm device number associated with the provided communicator.
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.int:Pointer to where the associated ROCm device index will be stored
C signature
ncclResult_t ncclCommCuDevice(const ncclComm_t comm, int * device)
- rocm.bindings.rccl.ncclCommUserRank(comm)#
Get the rank associated with a communicator
Returns the user-ordered “rank” associated with the provided communicator.
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.int:Pointer to where the associated rank will be stored
C signature
ncclResult_t ncclCommUserRank(const ncclComm_t comm, int * rank)
- rocm.bindings.rccl.ncclCommRegister(comm, buff, size)#
Register CUDA buffer for zero-copy operation
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclCommRegister(const ncclComm_t comm, void * buff, size_t size, void ** handle)
- rocm.bindings.rccl.ncclCommDeregister(comm, handle)#
Deregister CUDA buffer
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclCommDeregister(const ncclComm_t comm, void * handle)
- rocm.bindings.rccl.ncclCommSuspend(comm, flags)#
Suspend communicator operations to free resources.
Releases the resources selected by
flags.The communicator cannot be used untilncclCommResumeis called.- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclCommSuspend(ncclComm_t comm, int flags)
- rocm.bindings.rccl.ncclCommResume(comm)#
Resume a previously suspended communicator.
Reacquires every resource that was released by the matching
ncclCommSuspendcall.- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclCommResume(ncclComm_t comm)
- class rocm.bindings.rccl.ncclCommMemStat_t#
Bases:
enum.IntEnumCommunicator memory statistic selector
Identifier passed to
ncclCommMemStatsto choose which memory counter to read.
- rocm.bindings.rccl.ncclCommMemStats(comm, stat)#
Query communicator memory statistics.
- Args:
- comm (
ncclComm/object) – IN: Communicator to query
- stat (
ncclCommMemStat_t) – IN: One of
ncclCommMemStat_tvalues
- comm (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.int:Pointer to receive the memory statistic value
C signature
ncclResult_t ncclCommMemStats(ncclComm_t comm, ncclCommMemStat_t stat, uint64_t * value)
- rocm.bindings.rccl.ncclCommWindowRegister(comm, buff, size, winFlags)#
Register memory window
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- win (
ncclWindow_vidmem): (undocumented)
- win (
C signature
ncclResult_t ncclCommWindowRegister(ncclComm_t comm, void * buff, size_t size, ncclWindow_t * win, int winFlags)
- rocm.bindings.rccl.ncclCommWindowDeregister(comm, win)#
Deregister symmetric memory
- Args:
- comm (
ncclComm/object): (undocumented)
- win (
ncclWindow_vidmem/object): (undocumented)
- comm (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclCommWindowDeregister(ncclComm_t comm, ncclWindow_t win)
- rocm.bindings.rccl.ncclWinGetUserPtr(comm, win)#
Get the user pointer from the window
- Args:
- comm (
ncclComm/object): (undocumented)
- win (
ncclWindow_vidmem/object): (undocumented)
- comm (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclWinGetUserPtr(ncclComm_t comm, ncclWindow_t win, void ** outUserPtr)
- class rocm.bindings.rccl.ncclRedOp_dummy_t#
Bases:
enum.IntEnumDummy reduction enumeration
Dummy reduction enumeration used to determine value for ncclMaxRedOp
- class rocm.bindings.rccl.ncclRedOp_t#
Bases:
enum.IntEnumReduction operation selector
Enumeration used to specify the various reduction operations ncclNumOps is the number of built-in ncclRedOp_t values and serves as the least possible value for dynamic ncclRedOp_t values constructed by ncclRedOpCreate functions.
ncclMaxRedOp is the largest valid value for ncclRedOp_t and is defined to be the largest signed value (since compilers are permitted to use signed enums) that won’t grow sizeof(ncclRedOp_t) when compared to previous RCCL versions to maintain ABI compatibility.
- class rocm.bindings.rccl.ncclDataType_t#
Bases:
enum.IntEnumData types
Enumeration of the various supported datatype
- class rocm.bindings.rccl.ncclScalarResidence_t#
Bases:
enum.IntEnumLocation and dereferencing logic for scalar arguments.
Enumeration specifying memory location of the scalar argument. Based on where the value is stored, the argument will be dereferenced either while the collective is running (if in device memory), or before the ncclRedOpCreate() function returns (if in host memory).
- rocm.bindings.rccl.ncclRedOpCreatePreMulSum(op, scalar, datatype, residence, comm)#
Create a custom pre-multiplier reduction operator
Creates a new reduction operator which pre-multiplies input values by a given scalar locally before reducing them with peer values via summation. For use only with collectives launched against comm and datatype. The
residence* argument indicates how/when the memory pointed to by scalar
will be dereferenced. Upon return, the newly created operator’s handle is stored in op.
- Args:
- op (
Pointer/object) – OUT: Pointer to where newly created custom reduction operator is to be stored
- scalar (
Pointer/object) – IN: Pointer to scalar value.
- datatype (
ncclDataType_t) – IN: Scalar value datatype
- residence (
ncclScalarResidence_t) – IN: Memory type of the scalar value
- comm (
ncclComm/object) – IN: Communicator to associate with this custom reduction operator
- op (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclRedOpCreatePreMulSum(ncclRedOp_t * op, void * scalar, ncclDataType_t datatype, ncclScalarResidence_t residence, ncclComm_t comm)
- rocm.bindings.rccl.ncclRedOpDestroy(op, comm)#
Destroy custom reduction operator
Destroys the reduction operator op. The operator must have been created by ncclRedOpCreatePreMul with the matching communicator comm. An operator may be destroyed as soon as the last RCCL function which is given that operator returns.
- Args:
- op (
ncclRedOp_t) – IN: Custom reduction operator is to be destroyed
- comm (
ncclComm/object) – IN: Communicator associated with this reduction operator
- op (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclRedOpDestroy(ncclRedOp_t op, ncclComm_t comm)
- rocm.bindings.rccl.ncclReduce(sendbuff, recvbuff, count, datatype, op, root, comm, stream)#
Reduce
Reduces data arrays of length count in sendbuff into recvbuff using op operation.
recvbuff* may be NULL on all calls except for root device. root* is the rank (not the HIP device) where data will reside after the operation is complete.
In-place operation will happen if sendbuff == recvbuff.
- Args:
- sendbuff (
Pointer/object) – IN: Local device data buffer to be reduced
- recvbuff (
Pointer/object) – IN,OUT: Data buffer where result is stored (only for root rank). May be null for other ranks.
- count (
int) – IN: Number of elements in every send buffer
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- op (
ncclRedOp_t) – IN: Reduction operator type
- root (
int) – IN: Rank where result data array will be stored
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclReduce(const void * sendbuff, void * recvbuff, size_t count, ncclDataType_t datatype, ncclRedOp_t op, int root, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclBcast(buff, count, datatype, root, comm, stream)#
(Deprecated) Broadcast (in-place)
Copies count values from root to all other devices. root is the rank (not the CUDA device) where data resides before the operation is started. This operation is implicitly in-place.
- Args:
- buff (
Pointer/object) – IN,OUT: Input array on root to be copied to other ranks. Output array for all ranks.
- count (
int) – IN: Number of elements in data buffer
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- root (
int) – IN: Rank owning buffer to be copied to others
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- buff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclBcast(void * buff, size_t count, ncclDataType_t datatype, int root, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclBroadcast(sendbuff, recvbuff, count, datatype, root, comm, stream)#
Broadcast
- Copies count values from sendbuff on root to recvbuff on all devices.
root* is the rank (not the HIP device) where data resides before the operation is started. sendbuff* may be NULL on ranks other than root.
In-place operation will happen if sendbuff == recvbuff.
- Args:
- sendbuff (
Pointer/object) – IN: Data array to copy (if root). May be NULL for other ranks
- recvbuff (
Pointer/object) – IN,OUT: Data array to store received array
- count (
int) – IN: Number of elements in data buffer
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- root (
int) – IN: Rank of broadcast root
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclBroadcast(const void * sendbuff, void * recvbuff, size_t count, ncclDataType_t datatype, int root, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclAllReduce(sendbuff, recvbuff, count, datatype, op, comm, stream)#
All-Reduce
Reduces data arrays of length count in sendbuff using op operation, and leaves identical copies of result on each recvbuff. In-place operation will happen if sendbuff == recvbuff.
- Args:
- sendbuff (
Pointer/object) – IN: Input data array to reduce
- recvbuff (
Pointer/object) – IN,OUT: Data array to store reduced result array
- count (
int) – IN: Number of elements in data buffer
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- op (
ncclRedOp_t) – IN: Reduction operator
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclAllReduce(const void * sendbuff, void * recvbuff, size_t count, ncclDataType_t datatype, ncclRedOp_t op, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclAllReduceWithBias(sendbuff, recvbuff, count, datatype, op, comm, stream, acc)#
All-Reduce-with-Bias
Reduces data arrays of length count in sendbuff using op operation, and leaves identical copies of result on each recvbuff. In-place operation will happen if sendbuff == recvbuff.
- Args:
- sendbuff (
Pointer/object) – IN: Input data array to reduce
- recvbuff (
Pointer/object) – IN,OUT: Data array to store reduced result array
- count (
int) – IN: Number of elements in data buffer
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- op (
ncclRedOp_t) – IN: Reduction operator
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- acc (
Pointer/object) – IN: Bias data array to reduce
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclAllReduceWithBias(const void * sendbuff, void * recvbuff, size_t count, ncclDataType_t datatype, ncclRedOp_t op, ncclComm_t comm, hipStream_t stream, const void * acc)
- rocm.bindings.rccl.ncclReduceScatter(sendbuff, recvbuff, recvcount, datatype, op, comm, stream)#
Reduce-Scatter
Reduces data in sendbuff using op operation and leaves reduced result scattered over the devices so that recvbuff on rank i will contain the i-th block of the result. Assumes sendcount is equal to nranks*recvcount, which means that sendbuff should have a size of at least nranks*recvcount elements. In-place operations will happen if recvbuff == sendbuff + rank * recvcount.
- Args:
- sendbuff (
Pointer/object) – IN: Input data array to reduce
- recvbuff (
Pointer/object) – IN,OUT: Data array to store reduced result subarray
- recvcount (
int) – IN: Number of elements each rank receives
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- op (
ncclRedOp_t) – IN: Reduction operator
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclReduceScatter(const void * sendbuff, void * recvbuff, size_t recvcount, ncclDataType_t datatype, ncclRedOp_t op, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclAllGather(sendbuff, recvbuff, sendcount, datatype, comm, stream)#
All-Gather
Each device gathers sendcount values from other GPUs into recvbuff, receiving data from rank i at offset i*sendcount. Assumes recvcount is equal to nranks*sendcount, which means that recvbuff should have a size of at least nranks*sendcount elements. In-place operations will happen if sendbuff == recvbuff + rank * sendcount.
- Args:
- sendbuff (
Pointer/object) – IN: Input data array to send
- recvbuff (
Pointer/object) – IN,OUT: Data array to store the gathered result
- sendcount (
int) – IN: Number of elements each rank sends
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclAllGather(const void * sendbuff, void * recvbuff, size_t sendcount, ncclDataType_t datatype, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclAlltoAll(sendbuff, recvbuff, count, datatype, comm, stream)#
All-to-All
Each device sends count values to all other devices and receives count values from all other devices. Data to send to destination rank j is taken from sendbuff+j*count and data received from source rank i is placed at recvbuff+i*count.
- Args:
- sendbuff (
Pointer/object) – IN: Data array to send (contains blocks for each other rank)
- recvbuff (
Pointer/object) – IN,OUT: Data array to receive (contains blocks from each other rank)
- count (
int) – IN: Number of elements to send between each pair of ranks
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclAlltoAll(const void * sendbuff, void * recvbuff, size_t count, ncclDataType_t datatype, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclAlltoAllv(sendbuff, sendcounts, sdispls, recvbuff, recvcounts, rdispls, datatype, comm, stream)#
All-To-Allv
Device (i) sends sendcounts[j] of data from offset sdispls[j] to device (j). At the same time, device (i) receives recvcounts[j] of data from device (j) to be placed at rdispls[j]. sendcounts, sdispls, recvcounts and rdispls are all measured in the units of datatype, not bytes. In-place operation will happen if sendbuff == recvbuff.
- Args:
- sendbuff (
Pointer/object) – IN: Data array to send (contains blocks for each other rank)
- sendcounts (
ListOfUInt64/object) – IN: Array containing number of elements to send to each participating rank
- sdispls (
ListOfUInt64/object) – IN: Array of offsets into sendbuff for each participating rank
- recvbuff (
Pointer/object) – IN,OUT: Data array to receive (contains blocks from each other rank)
- recvcounts (
ListOfUInt64/object) – IN: Array containing number of elements to receive from each participating rank
- rdispls (
ListOfUInt64/object) – IN: Array of offsets into recvbuff for each participating rank
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclAlltoAllv(const void * sendbuff, const size_t[] sendcounts, const size_t[] sdispls, void * recvbuff, const size_t[] recvcounts, const size_t[] rdispls, ncclDataType_t datatype, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclGather(sendbuff, recvbuff, count, datatype, root, comm, stream)#
Gather
Each rank sends count elements from sendbuff to the root rank. On the root rank, data from rank i is placed at recvbuff + i*count. On non-root ranks, recvbuff is not used. root is the rank where data will be gathered.
In-place operations will happen if sendbuff == recvbuff + root * count.
- Args:
- sendbuff (
Pointer/object) – IN: Data array to send
- recvbuff (
Pointer/object) – IN,OUT: Data array to recv
- count (
int) – IN: Number of elements
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- root (
int) – IN: Rank of gather root
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclGather(const void * sendbuff, void * recvbuff, size_t count, ncclDataType_t datatype, int root, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclScatter(sendbuff, recvbuff, count, datatype, root, comm, stream)#
Scatter
On the root rank, count elements from sendbuff+i*count are sent to rank i. On non-root ranks, sendbuff is not used. Each rank receives count elements into recvbuff. root is the rank that will distribute the data.
In-place operations will happen if recvbuff == sendbuff + root * count.
- Args:
- sendbuff (
Pointer/object) – IN: Data array to send
- recvbuff (
Pointer/object) – IN,OUT: Data array to recv
- count (
int) – IN: Number of elements
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- root (
int) – IN: Rank of scatter root
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclScatter(const void * sendbuff, void * recvbuff, size_t count, ncclDataType_t datatype, int root, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclAllToAll(sendbuff, recvbuff, count, datatype, comm, stream)#
All-To-All
Device (i) send (j)th block of data to device (j) and be placed as (i)th block. Each block for sending/receiving has count elements, which means that recvbuff and sendbuff should have a size of nranks*count elements. In-place operation is NOT supported. It is the user’s responsibility to ensure that sendbuff and recvbuff are distinct.
- Deprecated:
ncclAllToAll is replaced with ncclAlltoAll and will be removed in the future.
- Args:
- sendbuff (
Pointer/object) – IN: Data array to send (contains blocks for each other rank)
- recvbuff (
Pointer/object) – IN,OUT: Data array to receive (contains blocks from each other rank)
- count (
int) – IN: Number of elements to send between each pair of ranks
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclAllToAll(const void * sendbuff, void * recvbuff, size_t count, ncclDataType_t datatype, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclAllToAllv(sendbuff, sendcounts, sdispls, recvbuff, recvcounts, rdispls, datatype, comm, stream)#
All-To-Allv
Device (i) sends sendcounts[j] of data from offset sdispls[j] to device (j). At the same time, device (i) receives recvcounts[j] of data from device (j) to be placed at rdispls[j]. sendcounts, sdispls, recvcounts and rdispls are all measured in the units of datatype, not bytes. In-place operation will happen if sendbuff == recvbuff.
- Deprecated:
ncclAllToAllv is replaced with ncclAlltoAllv and will be removed in the future.
- Args:
- sendbuff (
Pointer/object) – IN: Data array to send (contains blocks for each other rank)
- sendcounts (
ListOfUInt64/object) – IN: Array containing number of elements to send to each participating rank
- sdispls (
ListOfUInt64/object) – IN: Array of offsets into sendbuff for each participating rank
- recvbuff (
Pointer/object) – IN,OUT: Data array to receive (contains blocks from each other rank)
- recvcounts (
ListOfUInt64/object) – IN: Array containing number of elements to receive from each participating rank
- rdispls (
ListOfUInt64/object) – IN: Array of offsets into recvbuff for each participating rank
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclAllToAllv(const void * sendbuff, const size_t[] sendcounts, const size_t[] sdispls, void * recvbuff, const size_t[] recvcounts, const size_t[] rdispls, ncclDataType_t datatype, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclSend(sendbuff, count, datatype, peer, comm, stream)#
Send
Send data from sendbuff to rank peer. Rank peer needs to call ncclRecv with the same datatype and the same count as this rank. This operation is blocking for the GPU. If multiple ncclSend and ncclRecv operations need to progress concurrently to complete, they must be fused within a ncclGroupStart / ncclGroupEnd section.
- Args:
- sendbuff (
Pointer/object) – IN: Data array to send
- count (
int) – IN: Number of elements to send
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- peer (
int) – IN: Peer rank to send to
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- sendbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclSend(const void * sendbuff, size_t count, ncclDataType_t datatype, int peer, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclRecv(recvbuff, count, datatype, peer, comm, stream)#
Receive
Receive data from rank peer into recvbuff. Rank peer needs to call ncclSend with the same datatype and the same count as this rank. This operation is blocking for the GPU. If multiple ncclSend and ncclRecv operations need to progress concurrently to complete, they must be fused within a ncclGroupStart/ ncclGroupEnd section.
- Args:
- recvbuff (
Pointer/object) – IN,OUT: Data array to receive
- count (
int) – IN: Number of elements to receive
- datatype (
ncclDataType_t) – IN: Data buffer element datatype
- peer (
int) – IN: Peer rank to send to
- comm (
ncclComm/object) – IN: Communicator group object to execute on
- stream (
Pointer/object) – IN: HIP stream to execute collective on
- recvbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclRecv(void * recvbuff, size_t count, ncclDataType_t datatype, int peer, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclPutSignal(localbuff, count, datatype, peer, peerWin, peerWinOffset, sigIdx, ctx, flags, comm, stream)#
Put
One-sided communication operation that writes data from the local buffer to a remote peer’s registered memory window without explicit participation from the target process.
- Args:
- localbuff (
Pointer/object): (undocumented)
- count (
int): (undocumented)
- datatype (
ncclDataType_t): (undocumented)
- peer (
int): (undocumented)
- peerWin (
ncclWindow_vidmem/object): (undocumented)
- peerWinOffset (
int): (undocumented)
- sigIdx (
int): (undocumented)
- ctx (
int): (undocumented)
- flags (
int): (undocumented)
- comm (
ncclComm/object): (undocumented)
- stream (
Pointer/object): (undocumented)
- localbuff (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclPutSignal(const void * localbuff, size_t count, ncclDataType_t datatype, int peer, ncclWindow_t peerWin, size_t peerWinOffset, int sigIdx, int ctx, unsigned int flags, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclSignal(peer, sigIdx, ctx, flags, comm, stream)#
Signal
Sends a signal to the specified peer without transferring data.
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclSignal(int peer, int sigIdx, int ctx, unsigned int flags, ncclComm_t comm, hipStream_t stream)
- class rocm.bindings.rccl.ncclWaitSignalDesc_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- opCnt: Any#
- peer: Any#
- sigIdx: Any#
- ctx: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- rocm.bindings.rccl.ncclWaitSignal(nDesc, signalDescs, comm, stream)#
Wait Signal
Waits for signals as described in the signal descriptor array.
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclWaitSignal(int nDesc, ncclWaitSignalDesc_t * signalDescs, ncclComm_t comm, hipStream_t stream)
- rocm.bindings.rccl.ncclGroupStart()#
Group Start
Start a group call. All calls to RCCL until ncclGroupEnd will be fused into a single RCCL operation. Nothing will be started on the HIP stream until ncclGroupEnd.
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclGroupStart()
- rocm.bindings.rccl.ncclGroupEnd()#
Group End
End a group call. Start a fused RCCL operation consisting of all calls since ncclGroupStart. Operations on the HIP stream depending on the RCCL operations need to be called after ncclGroupEnd.
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: Result code. Seerccl_result_codefor more details.
C signature
ncclResult_t ncclGroupEnd()
- rocm.bindings.rccl.ncclGroupSimulateEnd(simInfo)#
Group Simulate End
Simulate a ncclGroupEnd() call and return NCCL’s simulation info in a struct.
- Args:
- simInfo (
ncclSimInfo_v22200/object): (undocumented)
- simInfo (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclGroupSimulateEnd(ncclSimInfo_t * simInfo)
- class rocm.bindings.rccl.ncclParamHandle(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.rccl.ncclParamHandle_t#
- rocm.bindings.rccl.ncclParamBind()#
Look up the parameter identified by key and store a handle to it in out.
The returned handle is owned by the parameter system and must not be freed by the caller.
- Returns:
A
tupleof size 3 that contains (in that order):ncclResult_t: (undocumented)- out (
ncclParamHandle): (undocumented)
- out (
- key (
int): (undocumented)
- key (
C signature
ncclResult_t ncclParamBind(ncclParamHandle_t ** out, const char * key)
- rocm.bindings.rccl.ncclParamGetI8(h)#
Read the value of the parameter bound to h as the type of out.
Function names are suffixed with I/U and 8/16/32/64 for 8-, 16-, 32- and 64-bit signed and unsigned integers.
- Args:
- h (
ncclParamHandle/object): (undocumented)
- h (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- out (
int): (undocumented)
- out (
C signature
ncclResult_t ncclParamGetI8(ncclParamHandle_t * h, int8_t * out)
- rocm.bindings.rccl.ncclParamGetI16(h)#
(No short description, might be part of a group.)
- Args:
- h (
ncclParamHandle/object): (undocumented)
- h (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- out (
int): (undocumented)
- out (
C signature
ncclResult_t ncclParamGetI16(ncclParamHandle_t * h, int16_t * out)
- rocm.bindings.rccl.ncclParamGetI32(h)#
(No short description, might be part of a group.)
- Args:
- h (
ncclParamHandle/object): (undocumented)
- h (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- out (
int): (undocumented)
- out (
C signature
ncclResult_t ncclParamGetI32(ncclParamHandle_t * h, int32_t * out)
- rocm.bindings.rccl.ncclParamGetI64(h)#
(No short description, might be part of a group.)
- Args:
- h (
ncclParamHandle/object): (undocumented)
- h (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- out (
int): (undocumented)
- out (
C signature
ncclResult_t ncclParamGetI64(ncclParamHandle_t * h, int64_t * out)
- rocm.bindings.rccl.ncclParamGetU8(h)#
(No short description, might be part of a group.)
- Args:
- h (
ncclParamHandle/object): (undocumented)
- h (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- out (
int): (undocumented)
- out (
C signature
ncclResult_t ncclParamGetU8(ncclParamHandle_t * h, uint8_t * out)
- rocm.bindings.rccl.ncclParamGetU16(h)#
(No short description, might be part of a group.)
- Args:
- h (
ncclParamHandle/object): (undocumented)
- h (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- out (
int): (undocumented)
- out (
C signature
ncclResult_t ncclParamGetU16(ncclParamHandle_t * h, uint16_t * out)
- rocm.bindings.rccl.ncclParamGetU32(h)#
(No short description, might be part of a group.)
- Args:
- h (
ncclParamHandle/object): (undocumented)
- h (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- out (
int): (undocumented)
- out (
C signature
ncclResult_t ncclParamGetU32(ncclParamHandle_t * h, uint32_t * out)
- rocm.bindings.rccl.ncclParamGetU64(h)#
(No short description, might be part of a group.)
- Args:
- h (
ncclParamHandle/object): (undocumented)
- h (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- out (
int): (undocumented)
- out (
C signature
ncclResult_t ncclParamGetU64(ncclParamHandle_t * h, uint64_t * out)
- rocm.bindings.rccl.ncclParamGetStr(h, out)#
Read the value of the parameter bound to h as a string.
Returned pointer is owned by the parameter system and is valid until the next ncclParamGetStr() call on the same thread.
- Args:
- h (
ncclParamHandle/object): (undocumented)
- out (
Pointer/object): (undocumented)
- h (
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t: (undocumented)
C signature
ncclResult_t ncclParamGetStr(ncclParamHandle_t * h, const char ** out)
- rocm.bindings.rccl.ncclParamGet(h, out, maxLen)#
Read the value of the parameter bound to h as raw binary data.
The user needs to allocate a buffer for the result and the parameter value is copied into user buffer as bytes.
- Args:
- h (
ncclParamHandle/object): (undocumented)
- out (
Pointer/object): (undocumented)
- maxLen (
int): (undocumented)
- h (
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- len (
int): (undocumented)
- len (
C signature
ncclResult_t ncclParamGet(ncclParamHandle_t * h, void * out, int maxLen, int * len)
- rocm.bindings.rccl.ncclParamGetParameter(value)#
Get parameter value as string by key.
Returned pointer is owned by the parameter system and is valid until the next ncclParamGetParameter() call on the same thread.
- Args:
- Returns:
A
tupleof size 3 that contains (in that order):ncclResult_t: (undocumented)- key (
int): (undocumented)
- key (
- valueLen (
int): (undocumented)
- valueLen (
C signature
ncclResult_t ncclParamGetParameter(const char * key, const char ** value, int * valueLen)
- rocm.bindings.rccl.ncclParamGetAllParameterKeys(table)#
Get all registered parameter keys.
Returned pointer table is owned by the parameter system and is valid until the next ncclParamGetAllParameterKeys() call on the same thread. By default, the results include only parameters published in NCCL documentation. Setting NCCL_PARAM_DUMP_ALL=true will include all parameters.
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):ncclResult_t: (undocumented)- tableLen (
int): (undocumented)
- tableLen (
C signature
ncclResult_t ncclParamGetAllParameterKeys(const char *** table, int * tableLen)
- rocm.bindings.rccl.ncclParamDumpAll()#
Dump all parameters to log output.
By default, the result includes only parameters published in NCCL documentation. Setting NCCL_PARAM_DUMP_ALL=true will include all parameters.
- Returns:
A
tupleof size 1 that contains (in that order):ncclResult_t:Always returns
ncclSuccess.
C signature
void ncclParamDumpAll()