gemm-optimization

Optimizes GEMM kernels on AMD CDNA GPUs using FlyDSL tiling, memory layout, MFMA scheduling.

260|104|Updated Nov 23, 2025
One-click install
npx skills add https://github.com/ROCm/FlyDSL --skill gemm-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemm-optimization
Source: https://github.com/ROCm/FlyDSL/tree/main/.claude/skills/gemm-optimization
Command: npx skills add https://github.com/ROCm/FlyDSL --skill gemm-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

FlyDSL GEMM optimization provides a comprehensive guide to maximizing performance of GEMM kernels on AMD CDNA GPUs by detailing tiling strategies, memory layouts, and MFMA scheduling patterns.

Core Features & Use Cases

  • Comprehensive tiling strategies, LDS ping-pong double buffering, XOR bank-conflict mitigation, A/B prefetch pipelines, two-stage software pipelining, hot_loop_scheduler MFMA scheduling, epilogue options (Direct Store vs CShuffle), TFLOPS and bandwidth analysis, ATT trace bottleneck diagnosis, and optimization recipes.
  • Real-world scenario: configure tile sizes, enable 2-stage LDS, compare direct store vs CShuffle, profile with ATT traces, and iteratively optimize kernels.

Quick Start

Follow the guide to implement GEMM optimizations for an AMD CDNA GPU using FlyDSL, starting with selecting tile_m, tile_n, and tile_k and enabling 2-stage LDS where appropriate.

Frequently Asked Questions about gemm-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize GEMM kernels on AMD CDNA GPUs?

Optimize GEMM kernels on AMD CDNA by selecting tile_m, tile_n, and tile_k sizes, enabling 2-stage LDS double buffering, and configuring MFMA scheduling patterns using FlyDSL to maximize hardware utilization.

What is the best way to resolve LDS bank conflicts during GEMM tiling?

Resolve LDS bank conflicts during GEMM tiling by applying XOR bank-conflict mitigation techniques alongside LDS ping-pong double buffering to ensure smooth memory access and improve bandwidth.

When should I use Direct Store versus CShuffle for GEMM epilogue?

Compare Direct Store versus CShuffle for GEMM epilogue based on specific memory layout requirements; evaluate both strategies using ATT trace bottleneck diagnosis to determine the optimal bandwidth configuration.

How does two-stage software pipelining improve MFMA scheduling?

Two-stage software pipelining improves MFMA scheduling by overlapping memory loads with computations using A/B prefetch pipelines and a hot_loop_scheduler, maximizing TFLOPS and ensuring continuous matrix instruction throughput.

Can I profile ATT traces to diagnose GEMM kernel bottlenecks?

Profile ATT traces to diagnose GEMM kernel bottlenecks by evaluating LDS bandwidth, MFMA utilization, and identifying specific memory or compute stalls, enabling iterative kernel optimization on AMD CDNA.

Does FlyDSL support hardware-specific tiling strategies for CDNA architectures?

FlyDSL supports CDNA architectures by providing comprehensive tiling strategies and memory layout configurations tailored for MFMA scheduling, satisfying specific requirements for hardware utilization and bandwidth.