SetBatchNum
Function Description
Resets the number of batches for multi-batch computation without changing tiling.
Prototype
1 | __aicore__ inline void SetBatchNum(int32_t batchA, int32_t batchB) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
batchA |
Input |
Number of batches of matrix A for one computation |
batchB |
Input |
Number of batches of matrix B for one computation |
Returns
None
Availability
Precautions
None
Example
1 2 3 4 5 6 7 8 9 | // CUBE-ONLY mode mm1.SetTensorA(gm_a, isTransposeAIn); mm1.SetTensorB(gm_b, isTransposeBIn); if(tiling.isBias) { mm1.SetBias(gm_bias); } SetBatchNum(batchA, batchB); // Multi-batch Matmul computation mm1.IterateBatch(gm_c, false, 0, false); |
Parent topic: Matmul