HCCL Tiling Constructor
Function
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
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 a communication task. The parameter is of the uint8_t type. For details about the value range, see Table 1. |
|
srcDataType |
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. |
|
commEngine |
Input |
Communication engine. The value is of the uint8_t type. For details about the value range of this parameter, see (Table 2). |
|
Data Type |
Description |
||
|---|---|---|---|
|
HcclCMDType |
Communication task type. For the For the
|
Returns
None
Restrictions
None
Example
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); |