SetValue

功能说明

设置GlobalTensor相应偏移位置的值。

函数原型

1
__aicore__ inline void SetValue(const uint64_t offset, PrimType value)

参数说明

表1 参数说明

参数名

输入/输出

描述

offset

输入

偏移offset个元素。

value

输入

设置值。PrimType类型。

PrimType定义如下:

1
2
// PrimT用于从T中提取基础数据类型:T传入基础数据类型,直接返回数据类型;T传入为TensorTrait类型时萃取TensorTrait中的LiteType基础数据类型
using PrimType = PrimT<T>;

返回值

无。

支持的型号

Atlas 训练系列产品

Atlas 推理系列产品AI Core

Atlas 推理系列产品Vector Core

Atlas A2 训练系列产品/Atlas 800I A2 推理产品/A200I A2 Box 异构组件

Atlas 200I/500 A2 推理产品

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

约束说明

无。