产品 |
是否支持 |
|---|---|
Ascend 950PR/Ascend 950DT |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
获取LocalTensor数据长度。
1 | __aicore__ inline uint32_t GetLength() const |
无
LocalTensor数据长度,单位为字节。
无
1 2 3 4 | // 获取localTensor的长度(单位为Byte),数据类型为int32_t,所以是16*sizeof(int32_t) uint32_t len = inputLocal.GetLength(); // inputLocal:0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // len: 64 |