asc_transpose
产品支持情况
| 产品 | 是否支持 |
|---|---|
| Atlas A3 训练系列产品/Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品/Atlas A2 推理系列产品 | √ |
功能说明
用于实现16*16的二维矩阵数据块转置。
函数原型
__aicore__ inline void asc_transpose(__ubuf__ int16_t* dst, __ubuf__ int16_t* src)
__aicore__ inline void asc_transpose(__ubuf__ uint16_t* dst, __ubuf__ uint16_t* src)
- 同步计算
__aicore__ inline void asc_transpose_sync(__ubuf__ int16_t* dst, __ubuf__ int16_t* src) __aicore__ inline void asc_transpose_sync(__ubuf__ uint16_t* dst, __ubuf__ uint16_t* src)
参数说明
| 参数名 | 输入/输出 | 描述 |
|---|---|---|
| dst | 输出 | 目的操作数(矢量)的起始地址。 |
| src | 输入 | 源操作数(矢量)的起始地址。 |
返回值说明
无
流水类型
PIPE_V
约束说明
- 操作数地址重叠约束请参考通用地址重叠约束。
- dst、src的起始地址需要32字节对齐。
调用示例
// total_length指参与计算的数据总长度
constexpr int total_length = 256;
__ubuf__ int16_t src[total_length];
// dst指目的操作数的地址
asc_transpose(dst, src);