gluon-mm-inst-opt

Replace global memory loads with AMD-native buffer instructions in Gluon GEMM kernels.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/leonling-ll/claude-skills --skill gluon-mm-inst-opt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gluon-mm-inst-opt
Source: https://github.com/leonling-ll/claude-skills/tree/main/gluon-mm-inst-opt
Command: npx skills add https://github.com/leonling-ll/claude-skills --skill gluon-mm-inst-opt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Optimizes memory access patterns in a Gluon GEMM kernel across CDNA3/4 GPUs by replacing global loads with AMD-native memory instructions and enabling an LDS-based DMA path on CDNA4 to unlock prefetching.

Core Features & Use Cases

  • Step A: Replace gl.load/gl.store with gl.amd.cdna3.buffer_load/buffer_store to reduce branches and address pressure.
  • Step B: For CDNA4 gfx950, introduce shared memory (LDS) and use gl.amd.cdna4.async_copy.buffer_load_to_shared to establish a streaming DMA path.
  • Use Case: Optimizes large GEMM kernels (e.g., MI300X/MI350) to improve MFMA throughput and reduce latency.

Quick Start

Run gluon-mm-inst-opt to apply Step A and, if on CDNA4 GPUs, Step B to establish an async DMA path from global memory to LDS.

Frequently Asked Questions about gluon-mm-inst-opt

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

FAQPage Schema
How do I optimize Gluon GEMM memory access on CDNA GPUs?

Optimize Gluon GEMM memory access on CDNA GPUs by replacing gl.load/gl.store with buffer_load/buffer_store to reduce branches and address pressure. On CDNA4, it uses async_copy to shared memory through LDS to enable prefetch-ready pipelines.

Does async_copy to shared memory work on CDNA3 GPUs?

Async_copy to shared memory does not work on CDNA3 GPUs. CDNA3 uses buffer_load and buffer_store to optimize memory paths, while async_copy to LDS for streaming DMA is exclusively a CDNA4 gfx950 feature.

Why use buffer_load instead of gl.load for large GEMM tile workloads?

Use buffer_load instead of gl.load for large GEMM tile workloads to reduce branches and address pressure. Replacing global loads with AMD-native memory instructions improves MFMA throughput and reduces latency on MI300X and MI350 GPUs.

What is the best way to enable prefetch-ready pipelines for GEMM kernels on CDNA4?

Enable prefetch-ready pipelines for GEMM kernels on CDNA4 by introducing shared memory and using async_copy.buffer_load_to_shared. This establishes a streaming DMA path from global memory to LDS to optimize large GEMM workloads.

Can I use this optimization for small GEMM tile workloads?

This optimization focuses on large GEMM tile workloads and performance-driven workflows. Applying it to small GEMM tiles may not yield the intended MFMA throughput improvements or latency reductions.

How do I apply Step A and Step B memory optimizations to my kernel?

Apply Step A and Step B memory optimizations by running the instruction replacement process. Step A replaces global loads with buffer instructions, and Step B applies CDNA4 async_copy to LDS if the target hardware supports it.