等待IterateBatch异步接口返回,支持连续输出到Global Memory。
1 | __aicore__ inline void WaitIterateBatch() |
参数名 |
输入/输出 |
描述 |
---|---|---|
无 |
无 |
NA |
无
1 2 3 4 5 6 7 8 9 | AscendC::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(); // 等待IterateBatch完成 DataCopy(dstUB, GM); // 进行GM到UB的拷贝 |