WaitIterateAll
功能说明
等待IterateAll异步接口返回,支持连续输出到Global Memory。
函数原型
| 1 | __aicore__ inline void WaitIterateAll() | 
参数说明
| 参数名 | 输入/输出 | 描述 | 
|---|---|---|
| 无 | 无 | NA | 
返回值
无
支持的型号
Atlas A2训练系列产品/Atlas 800I A2推理产品
注意事项
- 配套IterateAll异步接口使用。
- 仅支持连续输出至Global Memory。
调用示例
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 IterateAll<false>(workspaceGm[tmp_block_idx * mmResUbSize * sInnerLoopTimes],0,true);
// do some others compute
mm.WaitIterateAll(); // 等待IterateAll完成
DataCopy(dstUB, GM);  // 进行GM到UB的拷贝
父主题: Matmul