SetReduceDataTypeAbility (Deprecated)
This API has been deprecated and will be removed in later versions. Do not use this API. Use SetReduceType instead.
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
x |
|
x |
|
x |
|
x |
|
x |
|
x |
Function Usage
Sets the Reduce operation type, destination data type, and source data type. This function takes effect only for communication tasks that have reduction operations.
Prototype
1 | __aicore__ inline bool SetReduceDataTypeAbility(HcclReduceOp op, HcclDataType dstDataType, HcclDataType srcDataType) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
op |
Input |
Reduction operation type. This parameter is valid only for communication tasks that have reduction operations. The parameter is of the uint32_t type. The value is provided in 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. Different communication tasks support different output data types. The details are as follows:
|
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. Different communication tasks support the following input data types:
|
Returns
Returns whether the setting is successful.
Constraints
None
Examples
1 2 3 4 5 6 7 8 9 | Hccl<HcclServerType::HCCL_SERVER_TYPE_CCU> hccl; GM_ADDR contextGM = GetHcclContext<HCCL_GROUP_ID_0>(); hccl.InitV2(contextGM, &tilingData); auto ret = hccl.SetCcTilingV2(offsetof(AllReduceCustomTilingData, mc2CcTiling)); if (ret) { return; } hccl.SetReduceDataTypeAbility(HcclReduceOp::HCCL_REDUCE_RESERVED, AscendC::HcclDataType::HCCL_DATA_TYPE_BFP16, AscendC::HcclDataType::HCCL_DATA_TYPE_BFP16); |