aclrtReduceAsync

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

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

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.

The Atlas 350 Accelerator Card supports the following data types: int8, int16, int32, uint32, fp16, fp32, and bf16.

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

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

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

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

The Atlas training product supports only the fp32 data type.

stream

Input

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

reserve

Input

Reserved parameter. Currently, the value is fixed to NULL.

Returns

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

Restrictions

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