设置矩阵乘的右矩阵B。
__aicore__ inline void SetTensorB(const GlobalTensor<SrcT>& gm, bool isTransposeB = false);
__aicore__ inline void SetTensorB(const LocalTensor<SrcT>& rightMatrix, bool isTransposeB = false);
参数名 |
输入/输出 |
描述 |
---|---|---|
gm |
输入 |
B矩阵在Global Memory上的首地址。 Atlas推理系列产品AI Core,支持的数据类型为:half Atlas A2训练系列产品,支持的数据类型为:half/float/bfloat16_t/int8_t |
rightMatrix |
输入 |
B矩阵在TSCM上的首地址或者在VECCALC上的首地址。 Atlas推理系列产品AI Core,支持的数据类型为:half Atlas A2训练系列产品,支持的数据类型为:half/float/bfloat16_t/int8_t |
isTransposeB |
输入 |
B矩阵是否需要转置。 注意:若B矩阵MatmulType ISTRANS参数设置为true,此参数可以为true也可以为false,即运行时可以转置和非转置交替使用; 若B矩阵MatmulType ISTRANS参数设置为false,此参数只能设置为false,若强行设置为true,精度会有异常。 |
无
Atlas A2训练系列产品
Atlas推理系列产品AI Core
传入的TensorB地址空间大小需要保证不小于singleK * singleN。