目录

HasTensorInQue

Function Description

Queries whether there are enqueued tensors in the queue.

Function Prototype

__aicore__ inline bool HasTensorInQue()

Parameters

None

Supported Models

Kirin 9020 series processors

Kirin 9030 series processors

Kirin X90 series processors

Precautions

None

Return Value

Calling Example

// Determine whether there are enqueued tensors in the current queue based on HasTensorInQue. The depth of the current queue is 4. If there is no memory EnQue action, false is returned.
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();