Posts by Willa Zhu

Feeding the Matrix Cores: Assembly FP4 GEMM Kernel Design on AMD Instinct™ MI455X GPUs

The AMD Instinct™ MI455X GPU raises peak 4-bit matrix throughput four times over the MI355X, while HBM bandwidth rises about three times (specifications, MI355X). A GEMM kernel that was balanced on the previous generation is therefore supply-limited on this one: each byte loaded has to feed more math than before. This post walks through how the FP4 GEMM kernels in AITER close that gap on MI455X: how large the tiles have to be, how the Tensor Data Mover (TDM) replaces register-staged loads, how operands are laid out so that every request is a full-width transfer, and how the main loop is pipelined. It follows the earlier posts on Gluon GEMM kernels and on decode attention on MI450 series GPUs, and goes one level lower: the kernels here are hand-written assembly shipped in AITER under hsa/gfx1250/f4gemm. One theme runs through it. MI455X moves work that kernels used to do by hand into the hardware. This includes address generation, staging loads through registers, and sharing operands between workgroups. What is left for the kernel author is a smaller set of decisions that matter more: the tile, the layout and the pipeline.

Read more ...