aclrtReduceAsync

Applicability

Product

Supported

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

Description

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

Prototype

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.

type

Input

Data type.

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

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

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

The Atlas inference products supports the following data types: fp32, fp16, and int16.

The Atlas training products supports only the fp32 data type.

stream

Input

Stream for executing the Reduce operation task.

To use the default stream, pass NULL.

reserve

Input

Reserved. Currently, the value is fixed to NULL.

Returns

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

Restrictions

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