产品 |
是否支持 |
|---|---|
Ascend 950PR/Ascend 950DT |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
获取GlobalTensor的元素个数。
1 | __aicore__ inline uint64_t GetSize() const |
无。
GlobalTensor的元素个数。
使用仅传入全局数据指针的SetGlobalBuffer接口对GlobalTensor进行初始化,通过本接口获取到的元素个数为0。
AscendC::LocalTensor<uint8_t> stackBuffer; AscendC::PopStackBuffer<uint8_t, AscendC::TPosition::LCM>(stackBuffer); uint32_t stackBufferSize = stackBuffer.GetSize();