aclrtReduceAsync

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

√

Atlas inference products

√

Atlas training products

√

Function

Performs a Reduce operation, including SUM, MIN, and MAX. This is an asynchronous API.

Prototype

1
aclError aclrtReduceAsync(void *dst, const void *src, uint64_t count, aclrtReduceKind kind, aclDataType type, aclrtStream stream, void *reserve)

Parameters

Parameter

Input/Output

Description

dst

Input

Pointer to the destination memory address.

src

Input

Pointer to the source memory address.

count

Input

Size of the source memory, in bytes.

kind

Input

Operation type. For details about the type definition, see aclrtReduceKind.

type

Input

Data type. For details about the type definition, see aclDataType.

stream

Input

Stream for executing the Reduce operation task. For details about the type definition, see aclrtStream.

reserve

Input

Reserved. Currently, the value is fixed at NULL.

Returns

0 on success; otherwise, failure. For details, see aclError.

Restrictions

dst and src must be on the same device as stream.

For the Ascend 950PR/Ascend 950DT, the following data types are supported: int8, int16, int32, uint32, fp16, fp32, and bf16.

For the Atlas A3 training products/Atlas A3 inference products, the following data types are supported: int8, int16, int32, fp16, fp32, and bf16.

For the Atlas A2 training products/Atlas A2 inference products, the following data types are supported: int8, int16, int32, fp16, fp32, and bf16.

For the Atlas 200I/500 A2 inference products, the following data types are supported: int8, int16, int32, fp16, and fp32.

For the Atlas inference products, the following data types are supported: fp32, fp16, and int16.

For the Atlas training products, only the fp32 data type is supported.