Occupancy Math on the AMD MI355X GPU (CDNA4): A From-First-Principles Guide
Summary
A guide to occupancy math on the AMD Instinct™ MI355X GPU (CDNA4, gfx950) details how kernel performance is determined by resource limits rather than simply maximizing occupancy. The MI355X GPU features 256 Compute Units, 512 VGPRs per lane shared by regular and accumulator registers, and 160 KB of Local Data Share (LDS) per CU. Occupancy is capped by VGPRs, SGPRs, LDS, or workgroup/barrier slots. The article demonstrates that while CDNA3 kernels were often LDS-bound at 25% occupancy, CDNA4's larger 160 KB LDS shifts the bottleneck to VGPRs, achieving 50%. Crucially, a microbenchmark shows that high Instruction-Level Parallelism (ILP) can sustain ~97% of the ~5 PFLOP/s MXFP8 matrix peak even at 12% occupancy, outperforming higher occupancy with lower ILP.
Key takeaway
For GPU kernel engineers optimizing for the AMD MI355X GPU, prioritize feeding the Matrix Core over maximizing occupancy. Focus on increasing Instruction-Level Parallelism (ILP) by packing more independent accumulator tiles per wave, and use the largest possible register-resident tiles without spilling. Leverage the 160 KB LDS for deeper software-pipelined prefetch to keep the Matrix Core saturated, even if it means lower occupancy. Measure matrix-engine and VALU utilization, not just occupancy percentage, to guide your tuning decisions.
Key insights
Maximizing GPU occupancy is often counterproductive; prioritize Instruction-Level Parallelism (ILP) and larger register-resident tiles for peak performance.
Principles
- Occupancy is set by four resource limiters.
- VGPRs and AccVGPRs share a 512-entry file.
- ILP often outperforms Thread-Level Parallelism (TLP).
Method
Calculate occupancy ceiling by dividing hardware budgets (VGPRs, SGPRs, LDS, workgroup slots) by kernel resource usage, converting units, and taking the minimum.
In practice
- Use "llvm-objdump" for exact resource usage.
- Account for register allocation granularity (e.g., 8 VGPRs).
- Spend LDS on pipeline depth, not accumulators.
Topics
- AMD MI355X GPU
- CDNA4 Architecture
- GPU Occupancy
- Instruction-Level Parallelism
- Matrix Core
- Kernel Optimization
- MXFP8 GEMM
Code references
Best for: Machine Learning Engineer, AI Engineer, AI Hardware Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by AMD ROCm Blogs.