设置矩阵乘的Bias。
__aicore__ inline void SetBias(const GlobalTensor<T>& biasGlobal)
__aicore__ inline void SetBias(const LocalTensor<T>& biasLocal)
参数名 |
输入/输出 |
描述 |
---|---|---|
biasGlobal |
输入 |
Bias在Global Memory上的首地址,类型为GlobalTensor。 Atlas推理系列产品AI Core,支持的数据类型为:half/float/int32_t,其中仅在A、B的数据类型为int8_t时,Bias的数据类型可以设置为int32_t Atlas A2训练系列产品/Atlas 800I A2推理产品,支持的数据类型为:half/float/int32_t,其中仅在A、B的数据类型为int8_t时,Bias的数据类型可以设置为int32_t Atlas 200I/500 A2推理产品,支持的数据类型为:half/float/int32_t,其中仅在A、B的数据类型为int8_t时,Bias的数据类型可以设置为int32_t |
biasLocal |
输入 |
Bias在VECOUT/TSCM上的首地址,类型为LocalTensor。 Atlas推理系列产品AI Core,支持的数据类型为:half/float/int32_t Atlas A2训练系列产品/Atlas 800I A2推理产品,支持的数据类型为:half/float/int32_t,其中仅在A、B的数据类型为int8_t时,Bias的数据类型可以设置为int32_t Atlas 200I/500 A2推理产品,支持的数据类型为:half/float/int32_t,其中仅在A、B的数据类型为int8_t时,Bias的数据类型可以设置为int32_t |
无
Atlas A2训练系列产品/Atlas 800I A2推理产品
Atlas推理系列产品AI Core
Atlas 200I/500 A2推理产品
传入的Bias地址空间大小需要保证不小于singleN。