|
产品 |
是否支持 |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
x |
|
|
√ |
|
|
x |
释放队列中申请的所有同步事件。队列分配的Buffer关联着同步事件的eventID,因为同步事件的数量有限制,如果同时使用的队列Buffer数量超过限制,将无法继续申请队列,使用本接口释放队列中的事件后,可以再次申请队列。详细介绍请参考TQue Buffer限制。
1
|
__aicore__ inline void FreeAllEvent() |
无
该接口不支持Tensor原地操作,即TQue的depth设置为0的场景。
无
1 2 3 4 5 6 7 8 9 10 11 |
// 接口: DeQue Tensor AscendC::TPipe pipe; AscendC::TQueBind<AscendC::TPosition::VECOUT, AscendC::TPosition::GM, 4> que; int num = 4; int len = 1024; pipe.InitBuffer(que, num, len); AscendC::LocalTensor<half> tensor1 = que.AllocTensor<half>(); que.EnQue(tensor1); tensor1 = que.DeQue<half>(); // 将tensor从VECOUT的Queue中搬出 que.FreeTensor<half>(tensor1); que.FreeAllEvent(); |