WaitIterateBatch

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product's AI Core

x

Atlas inference product's Vector Core

x

Atlas training products

x

Function

Waits for the return of asynchronous API IterateBatch or IterateNBatch 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

Restrictions

  • This API is used together with asynchronous API IterateBatch or IterateNBatch.
  • Data can only be continuously output to the Global Memory.
  • This API is not supported when enableMixDualMaster (dual-master mode) is set to true.

Example

1
2
3
4
5
6
7
8
9
AscendC::Matmul<aType, bType, cType, biasType> mm;
mm.SetTensorA(gm_a[offsetA]);
mm.SetTensorB(gm_b[offsetB]);
if (tiling.isBias) {
    mm.SetBias(gm_bias[offsetBias]);
}
mm.IterateBatch(gm_c[offsetC], batchA, batchB, false);
// do some other compute tasks
mm.WaitIterateBatch(); // Wait for IterateBatch to complete.