产品 |
是否支持 |
|---|---|
Ascend 950PR/Ascend 950DT |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
在指定position(逻辑位置)申请临时空间,空间大小为指定position的全部剩余空间。
template <typename T, TPosition pos> __aicore__ inline bool PopStackBuffer(LocalTensor<T>& popLocal)
参数名 |
描述 |
|---|---|
T |
popLocal的数据类型,支持的数据类型如下:uint8_t、int8_t、int16_t、uint16_t、int32_t、uint32_t、int64_t、uint64_t、float、half。 |
pos |
需要申请临时空间的position,数据类型为TPosition。 |
参数名 |
输入/输出 |
描述 |
|---|---|---|
popLocal |
输出 |
申请临时空间对应的Tensor,Tensor大小为对应position的剩余全部空间。 |
表示函数执行的结果,true表示成功,false表示失败。
AscendC::LocalTensor<int16_t> popBuffer; bool ret = AscendC::PopStackBuffer<int16_t, AscendC::TPosition::VECCALC>(popBuffer);