gluon-pipeline-opt

Implement two-stage pipeline optimizations for Gluon GEMM kernels on CDNA3 and CDNA4 GPUs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Two-stage pipeline optimizations to hide global memory latency and LDS read latency in Gluon GEMM kernels on CDNA3 (gfx942) and CDNA4 (gfx950) GPUs, enabling higher MFMA throughput and better occupancy.

Core Features & Use Cases

  • Stage 1: Global prefetch with double buffering to overlap data loads with compute across CDNA3/CDNA4 variants.
  • Stage 2: Local prefetch to overlap ds_read with MFMA, architecture-agnostic.
  • Use Case: Optimizing a Gluon GEMM kernel on MI300X/MI350 class GPUs to reduce vmcnt/lgkmcnt stalls and improve MFMA efficiency.

Quick Start

Apply Stage 1 to your kernel, verify correctness, then consider Stage 2 to further hide remaining stalls.

Frequently Asked Questions about gluon-pipeline-opt

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

FAQPage Schema
How do I hide global memory latency in Gluon GEMM kernels on CDNA GPUs?

You can hide global memory latency in Gluon GEMM kernels by applying a two-stage pipeline optimization with double buffering, overlapping data loads with compute to maintain high MFMA throughput on CDNA3 and CDNA4 architectures.

What is the best way to overlap ds_read latency with MFMA on MI300X?

The best way to overlap ds_read latency with MFMA on MI300X is to implement Stage 2 local prefetch in your Gluon GEMM kernel, an architecture-agnostic optimization that reduces lgkmcnt stalls and improves compute efficiency.

Does the dual-stage prefetch optimization support both CDNA3 and CDNA4 architectures?

Yes, the dual-stage prefetch optimization supports both CDNA3 and CDNA4 architectures by using architecture-specific paths, utilizing async_copy for CDNA4 and buffer_load for CDNA3 to enable global prefetch and double buffering.

How do I apply two-stage pipeline optimizations to a Gluon GEMM kernel?

To apply two-stage pipeline optimizations, first implement Stage 1 for global prefetch and double buffering, verify correctness with included checks, then apply Stage 2 to overlap ds_read with MFMA and validate performance using traces.

Why does my Gluon GEMM kernel experience vmcnt stalls on gfx942?

Your Gluon GEMM kernel experiences vmcnt stalls on gfx942 due to exposed global memory latency; applying Stage 1 pipeline optimizations with double buffering hides this latency to improve MFMA utilization.