Window Streaming Buffer Config - Window Streaming Buffer Config - 2025.2 English - XD100

Vitis Tutorials: AI Engine Development (XD100)

Document ID
XD100
Release Date
2026-03-27
Version
2025.2 English

The graph.h graph performs GeMM with graph window streaming buffer size as WINDOW_SIZE. The buffer size remains fixed to matrix dimension.

...
   #define SPLIT 3
   #define CASC_LN 8
   #define N_SAMPLES 1
   
   //defining DIM_A, DIM_B, DIM_AB
   #if GEMM_SIZE == 32
   #define DIM_A 16 
   #define DIM_B 12
   #elif GEMM_SIZE == 64
   #define DIM_A 32 
   #define DIM_B 24
   #elif GEMM_SIZE == 128
   #define DIM_A 44 
   #define DIM_B 44 
   #elif GEMM_SIZE == 256
   #define DIM_A 44 
   #define DIM_B 44 
   #elif GEMM_SIZE == 512
   #define DIM_A 16 
   #define DIM_B 16
   #elif GEMM_SIZE == 1024
   #define DIM_A 16 
   #define DIM_B 16
   #endif
   #define DIM_AB (GEMM_SIZE)
   
   //defining GEMM_SIZE_ZP_A
   #if (GEMM_SIZE % DIM_A) == 0 
       #define GEMM_SIZE_ZP_A GEMM_SIZE
   #else 
       #define GEMM_SIZE_ZP_A (GEMM_SIZE - (GEMM_SIZE % DIM_A) + DIM_A)
   #endif
   
   //defining GEMM_SIZE_ZP_B
   #if (GEMM_SIZE % (DIM_B*SPLIT)) == 0 
       #define GEMM_SIZE_ZP_B GEMM_SIZE
   #else 
       #define GEMM_SIZE_ZP_B ((GEMM_SIZE) - ((GEMM_SIZE) % (DIM_B*SPLIT)) + (DIM_B*SPLIT))
   #endif

   #endif
   
   
   #define WINDOW_SIZE_A (DIM_A * DIM_AB * N_SAMPLES)
   #define WINDOW_SIZE_B (DIM_B * DIM_AB * N_SAMPLES)
...