SetOpType
Function
Sets the communication task type.
Prototype
1 | uint32_t SetOpType(uint32_t opType) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
opType |
Input |
Type of a communication task. The type is uint32_t. HCCL APIs provide the enumeration definition HcclCMDType as the value of the parameter. For the For the |
Returns
- 0: Setting succeeded.
- Other values: Setting failed.
Restrictions
None
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | const char *groupName = "testGroup"; uint32_t opType = HCCL_CMD_REDUCE_SCATTER; std::string algConfig = "ReduceScatter=level0:doublering"; AscendC::Mc2CcTilingConfig mc2CcTilingConfig(groupName, opType, algConfig, HCCL_REDUCE_RESERVED); mc2CcTilingConfig.SetReduceType(HCCL_REDUCE_SUM); mc2CcTilingConfig.GetTiling(tiling->mc2InitTiling); mc2CcTilingConfig.GetTiling(tiling->reduceScatterTiling); algConfig = "AllGather=level0:doublering"; mc2CcTilingConfig.SetGroupName(groupName); mc2CcTilingConfig.SetOpType(HCCL_CMD_ALLGATHER); // Set the communication task type. mc2CcTilingConfig.SetAlgConfig(algConfig); mc2CcTilingConfig.SetSkipLocalRankCopy(0); mc2CcTilingConfig.SetSkipBufferWindowCopy(1); mc2CcTilingConfig.GetTiling(tiling->allGatherTiling); |
Parent topic: HCCL Tiling APIs