SetReduceType

Function

Sets the reduction operation type. This parameter is valid only for communication tasks that have reduction operations.

Prototype

1
uint32_t SetReduceType(uint32_t reduceType, uint8_t dstDataType = 0, uint8_t srcDataType = 0)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

reduceType

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 a communication task. The parameter is of the uint8_t type. For details about the value range, see Table 1.

Atlas A3 training products/Atlas A3 inference products. This parameter is not supported currently and does not take effect after being configured.

Atlas A2 training products/Atlas A2 inference products. This parameter is not supported currently and does not take effect after being configured.

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.

Atlas A3 training products/Atlas A3 inference products. This parameter is not supported currently and does not take effect after being configured.

Atlas A2 training products/Atlas A2 inference products. This parameter is not supported currently and does not take effect after being configured.

Returns

  • 0: Setting succeeded.
  • Other values: Setting failed.

Restrictions

None

Example

For details about the calling example of this API, see Example.