Template Parameters - 2023.2 English

Vitis Libraries

Release Date
2023.2 English

To see details on the template parameters for the Matrix Multiply, see API Reference Overview.

NOTE: Maximum matrix dimensions per kernel. Maximum memory accessible by an AIE kernel is 32kB x 4 for AIE. The maximum matrix dimensions per kernel is limited by the memory requirements and how much memory is available. A matrix_mult design needs to allocate memory for the following:

  • Window Size A = Input matrix A of size P_DIM_A x P_DIM_AB x sizeof(T_DATA_A).
  • Window Size B = Input matrix B of size P_DIM_B x P_DIM_AB x sizeof(T_DATA_B).
  • Window Size Out = Output matrix of size P_DIM_A x P_DIM_B x sizeof(T_DATA_OUT).

Optionally, depending on whether we use the tiling/detiling feature of the element we have need:

  • If Matrix A needs to be tiled - add memory of Window Size A
  • If Matrix B needs to be tiled - add memory of Window Size B
  • If Output matrix needs to be detiled - add memory of Window Size Out

Further, if these buffers are ping-pong buffers, their memory requirement doubles in size. We can reduce this factor by using the single_buffer constraint on the buffer. Apart from these, the program also needs some system memory to run which has been empirically observed to occupy around 2.5kB.

To get around issues of memory requirements too large to fit in a single kernel, increase the value of TP_CASC_LEN to split the dimension P_DIM_AB over multiple kernels.