WaitIterateBatch
Function Description
Waits for the return of the asynchronous IterateBatch API and continuously outputs data to the Global Memory.
Prototype
1 | __aicore__ inline void WaitIterateBatch() |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
None |
None |
N/A |
Returns
None
Availability
Precautions
- This API is used together with the asynchronous IterateBatch API.
- Data can only be continuously output to the Global Memory.
Example
1 2 3 4 5 6 7 8 9 | matmul::Matmul<aType, bType, cType, biasType> mm; mm.SetTensorA(queryGm[tensorACoreOffset]); mm.SetTensorB(keyGm[tensorBCoreOffset + sInnerStart * singleProcessSInnerSize * tilingData->attentionScoreOffestStrideParams.matmulHead], true); mm.SetTail(singleProcessSOuterSize, mmNNum); mm.template IterateBatch<false>(workspaceGm[tmp_block_idx * mmResUbSize * sInnerLoopTimes],batchA, batchB, false); // do some others compute mm.WaitIterateBatch(); // Wait for IterateBatch to complete. DataCopy(dstUB, GM); // Copy data from GM to UB. |
Parent topic: Matmul