Custom Reduction Operator#
Rocprofiler SDK Developer API 0.5.0
ROCm Profiling API and tools
|
Enumerations | |
enum | ncclScalarResidence_t { ncclScalarDevice = 0 , ncclScalarHostImmediate = 1 } |
Location and dereferencing logic for scalar arguments. More... | |
Functions | |
ncclResult_t | ncclRedOpCreatePreMulSum (ncclRedOp_t *op, void *scalar, ncclDataType_t datatype, ncclScalarResidence_t residence, ncclComm_t comm) |
Create a custom pre-multiplier reduction operator. | |
ncclResult_t | ncclRedOpDestroy (ncclRedOp_t op, ncclComm_t comm) |
Destroy custom reduction operator. | |
Detailed Description
API calls relating to creation/destroying custom reduction operator that pre-multiplies local source arrays prior to reduction
Enumeration Type Documentation
◆ ncclScalarResidence_t
Location 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).
Enumerator | |
---|---|
ncclScalarDevice | Scalar is in device-visible memory |
ncclScalarHostImmediate | Scalar is in host-visible memory |
Definition at line 466 of file rccl.h.
Function Documentation
◆ ncclRedOpCreatePreMulSum()
ncclResult_t ncclRedOpCreatePreMulSum | ( | ncclRedOp_t * | op, |
void * | scalar, | ||
ncclDataType_t | datatype, | ||
ncclScalarResidence_t | residence, | ||
ncclComm_t | 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.
- Returns
- Result code. See Result Codes for more details.
- Parameters
-
[out] op Pointer to where newly created custom reduction operator is to be stored [in] scalar Pointer to scalar value. [in] datatype Scalar value datatype [in] residence Memory type of the scalar value [in] comm Communicator to associate with this custom reduction operator
◆ ncclRedOpDestroy()
ncclResult_t ncclRedOpDestroy | ( | ncclRedOp_t | op, |
ncclComm_t | 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.
- Returns
- Result code. See Result Codes for more details.
- Parameters
-
[in] op Custom reduction operator is to be destroyed [in] comm Communicator associated with this reduction operator
Generated by 1.9.8