Skip to content
版 本

GetReduceRepeatSumSpr(ISASI)

产 品 支 持 情 况

产 品

是 否 支 持

Ascend 950PR/Ascend 950DT

Atlas A3 训 练 系 列 产 品/Atlas A3 推 理 系 列 产 品

Atlas A2 训 练 系 列 产 品/Atlas A2 推 理 系 列 产 品

Atlas 200I/500 A2 推 理 产 品

x

Atlas 推 理 系 列 产 品AI Core

x

Atlas 推 理 系 列 产 品Vector Core

x

Atlas 训 练 系 列 产 品

x

功 能 说 明

获 取ReduceSum接 口(Tensor前n个 数 据 计 算 接 口,n为 接 口 的count参 数)的 计 算 结 果。

函 数 原 型

Text
template <typename T>
__aicore__ inline T GetReduceRepeatSumSpr()

参 数 说 明

表 1 模 板 参 数 说 明

参 数 名

描 述

T

ReduceSum指 令 的 数 据 类 型,支 持half、float。

返 回 值 说 明

ReduceSum接 口(Tensor前n个 数 据 计 算 接 口,n为 接 口 的count参 数)的 计 算 结 果。

约 束 说 明

无。

调 用 示 例

具 体 可 参 考GetReduceRepeatSumSpr样 例

Text
AscendC::LocalTensor<float> src;
AscendC::LocalTensor<float> work;
AscendC::LocalTensor<float> dst;
AscendC::ReduceSum(dst, src, work, 128);
float res = AscendC::GetReduceRepeatSumSpr<float>(); // 返 回 前128个 数 的 和

免 责 声 明:本 站 内 容 由 asc-devkit 仓 master 分 支 自 动 编 译 生 成,属 于 持 续 开 发 版 本,可 能 存 在 缺 陷,仅 供 预 览 与 参 考。如 需 稳 定 及 商 用 资 料,请 查 阅 官 方 昇 腾 社 区