HCCL Tiling Constructor
Function Usage
Creates an Mc2CcTilingConfig object.
Prototype
1
|
Mc2CcTilingConfig(const std::string &groupName, uint32_t opType, const std::string &algConfig, uint32_t reduceType = 0, uint8_t dstDataType = 0, uint8_t srcDataType = 0, uint8_t commEngine = 0) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
groupName |
Input |
Communicator where the current communication task is located. The value is of the string type and can contain a maximum of 128 bytes. |
|
opType |
Input |
Type of a communication task. The type is uint32_t. HCCL APIs provide the HcclCMDType enumeration definition as the value of this parameter. For details about the supported communication task types and values, see Table 2. |
|
algConfig |
Input |
Communication algorithm configuration. The value is of the string type and can contain a maximum of 128 bytes. For the Atlas 350 Accelerator Card, this parameter is reserved and does not take effect after being configured. By default, only the FullMesh algorithm is supported. The FullMesh algorithm implies full-mesh connections between NPUs, enabling data transmission between any two NPUs. For details, see Introduction to HCCL in . For the
For the |
|
reduceType |
Input |
Reduction operation type. This parameter is valid only for communication tasks that have reduction operations. The value is of the uint32_t type. For details, see Table 2. |
|
dstDataType |
Input |
Data type of the output data in the communication task. The parameter is of the uint8_t type. For details about the value range, see Table 1. For the Atlas 350 Accelerator Card, different communication tasks support different output data types. The details are as follows:
For the For the |
|
Input |
Data type of the input data in the communication task. The parameter is of the uint8_t type. For details about the value range, see Table 1. For the Atlas 350 Accelerator Card, different communication tasks support the following input data types:
For the For the |
|
|
commEngine |
Input |
Communication engine. The value is of the uint8_t type. For details about the value range of this parameter, see hcclOpExpansionMode. |
|
Data Type |
Description |
||
|---|---|---|---|
|
HcclCMDType |
Type of a communication task. For the Atlas 350 Accelerator Card, the supported communication task types are HCCL_CMD_ALLREDUCE, HCCL_CMD_ALLGATHER, HCCL_CMD_REDUCE_SCATTER, HCCL_CMD_ALLTOALL, HCCL_CMD_ALLTOALLV, and HCCL_CMD_HALF_ALLTOALLV. For the For the
|
Returns
None
Restrictions
None
Examples
1 2 3 4 5 6 7 8 9 10 |
const char *groupName = "testGroup"; uint32_t opType = HCCL_CMD_REDUCE_SCATTER; std::string algConfig = "ReduceScatter=level0:fullmesh"; uint32_t reduceType = HCCL_REDUCE_SUM; uint8_t dstDataType = HCCL_DATA_TYPE_FP16; uint8_t srcDataType = HCCL_DATA_TYPE_FP16; uint8_t commEngine = 0; AscendC::Mc2CcTilingConfig mc2CcTilingConfig(groupName, opType, algConfig, reduceType, dstDataType, srcDataType, commEngine); // Constructor. mc2CcTilingConfig.GetTiling(tiling->mc2InitTiling); // tiling is the TilingData structure assembled by the operator. mc2CcTilingConfig.GetTiling(tiling->reduceScatterTiling); |