---
title: aclrtReduceAsync
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclcppdevg_03_1871.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclcppdevg_03_1871.html
indexId: d402783d7d52b51523ce6208d864f75a9e7e2f4ee4c534af4cce3000ee36ad3f68
---
# aclrtReduceAsync

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 功能说明

执行Reduce操作，包括SUM、MIN、MAX等。异步接口。


#### 函数原型

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


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| dst | 输入 | 目的内存地址指针。 |
| src | 输入 | 源内存地址指针。 |
| count | 输入 | 源内存大小，单位为Byte。 |
| kind | 输入 | 操作类型。类型定义请参见aclrtReduceKind。 |
| type | 输入 | 数据类型。类型定义请参见aclDataType。 Atlas 350 加速卡支持如下类型：int8、int16、int32、uint32、fp16、fp32、bf16。 Atlas A3 训练系列产品 / Atlas A3 推理系列产品 支持如下类型：int8、int16、int32、fp16、fp32、bf16。 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 支持如下类型：int8、int16、int32、fp16、fp32、bf16。 Atlas 200I/500 A2 推理产品 支持如下类型：int8、int16、int32、fp16、fp32。 Atlas 推理系列产品 支持如下类型：fp32 、fp16、int16。 Atlas 训练系列产品 仅支持fp32类型。 |
| stream | 输入 | 指定执行Reduce操作任务的Stream。类型定义请参见aclrtStream。 |
| reserve | 输入 | 预留参数。当前固定传NULL。 |


#### 返回值说明

返回0表示成功，返回其他值表示失败，请参见aclError。


#### 约束说明

dst、src必须跟stream所在的Device是同一个设备。
