AssignQueue
Product Support
Product |
Supported |
|---|---|
x |
|
√ |
|
x |
|
x |
|
x |
|
x |
Function
Defines the index of a message queue in the CubeResGroupHandle object bound to the AIV.
Prototype
1 | __aicore__ inline void AssignQueue(uint8_t queueIdIn) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
queueIdIn |
Input |
Index of a message queue in the CubeResGroupHandle object. |
Returns
None
Restrictions
- The value of queueIdIn is less than the value of msgQueueSize which indicates the total number of message queues of CubeResGroupHandle, that is, the value range is [0, msgQueueSize – 1].
- Each message queue in CubeResGroupHandle must be bound and cannot be bound repeatedly.
Example
1 2 3 4 5 6 7 8 | AscendC::KfcWorkspace desc(workspaceGM); // User-managed workspace pointer. uint8_t blockStart = 0; uint8_t blockSize = 12; uint8_t msgQueueSize = 48; auto handle = AscendC::CreateCubeResGroup<GROUPID, MatmulApiType, MyCallbackFunc, CubeMsgBody> (desc, blockStart, blockSize, msgQueueSize, tilingGM); // Currently, there are 48 blocks in total. Each block is bound to message queues in the handle. Each queue in msgQueue is bound and there is no repeated binding. auto queIdx = AscendC::GetBlockIdx(); handle.AssignQueue(queIdx); |
Parent topic: CubeResGroupHandle