HasTensorInQue
产品支持情况
产品 |
是否支持 |
---|---|
|
√ |
|
√ |
|
√ |
|
√ |
|
x |
|
√ |
|
x |
功能说明
查询Que中目前是否已有入队的Tensor。
函数原型
1
|
__aicore__ inline bool HasTensorInQue() |
参数说明
无
返回值说明
- true - 表示Queue中存在已入队的Tensor
- false - 表示Queue为完全空闲
调用示例
1 2 3 4 5 6 7 |
// 根据VacantInQue判断当前que中是否有已入队的Tensor,当前que的深度为4,无内存Enque动作,返回为false AscendC::TPipe pipe; AscendC::TQueBind<AscendC::TPosition::VECOUT, AscendC::TPosition::GM, 4> que; int num = 4; int len = 1024; pipe.InitBuffer(que, num, len); bool ret = que.HasTensorInQue(); |
父主题: TQueBind