Agent skill

Gemm Optimization

by ROCm in ROCm/FlyDSL

Comprehensive guide to optimizing GEMM (General Matrix Multiply) kernels in FlyDSL on AMD CDNA GPUs.

Custom licenceAuto-check: notes

Install Gemm Optimization

skills CLI
$ npx skills add ROCm/FlyDSL --skill gemm-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ROCm/FlyDSL gemm-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ROCm/FlyDSL.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/gemm-optimization .claude/skills/gemm-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gemm-optimization
GitHub stars
287
Token cost
~6.4k tokens
SKILL.md length
1,783 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
Custom licence

At a glance

Comprehensive guide to optimizing GEMM (General Matrix Multiply) kernels in FlyDSL on AMD CDNA GPUs.

  • Works in 12 steps: Tiling Strategy → LDS Ping-Pong Double Buffer (2-Stage… → LDS XOR Bank-Conflict Swizzle → …
  • SKILL.md covers 1. Tiling Strategy, 2. LDS Ping-Pong Double Buffer…, 3. LDS XOR Bank-Conflict Swizzle and 4. Data Prefetch Pipeline, plus 2 more sections
  • Calls python

What it does

Gemm Optimization is an agent skill from ROCm/FlyDSL. Comprehensive guide to optimizing GEMM (General Matrix Multiply) kernels in FlyDSL on AMD CDNA GPUs. Covers tiling strategy, LDS ping-pong double-buffer, XOR bank-conflict swizzle, A/B data prefetch pipeline, 2-stage software pipelining, MFMA instruction scheduling (hotloopscheduler), epilogue strategies (direct store vs CShuffle), TFLOPS/bandwidth calculation, main-loop instruction count analysis, and bottleneck identification from ATT traces. Based on the production preshufflegemm kernel. Usage…

Its SKILL.md is about 6.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: FlyDSL is the Python front‑end of the project: a Flexible Layout Python DSL for expressing tiling, partitioning, data movement, and kernel structure at a high level.

Example prompts

  • “/gemm-optimization”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Edit, Bash, Grep, Glob, Agent

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Tiling Strategy
  2. LDS Ping-Pong Double Buffer (2-Stage Pipeline)
  3. LDS XOR Bank-Conflict Swizzle
  4. Data Prefetch Pipeline
  5. Instruction Scheduling (hot_loop_scheduler)
  6. MFMA Inner Loop Structure
  7. Epilogue Strategies
  8. Performance Metrics and Bottleneck Analysis
  9. Main-Loop Instruction Count Analysis
  10. Register Budget
  11. Async Copy (gfx942/gfx950)
  12. B Matrix Preshuffle Layout

What it can do on your machine

Read from SKILL.md and the folder at commit 1941889. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Edit
    • Bash
    • Grep
    • Glob
    • Agent

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gemm Optimization loads about 6.4k tokens when it runs. Until then it costs about 136 tokens; SKILL.md has 1,783 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~136
When it runs · the whole SKILL.md, loaded when a task matches
~6.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Edit, Bash, Grep, Glob, Agent

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 1,783 words (~6,448 tokens).

“Comprehensive guide to writing and optimizing high-performance GEMM kernels in FlyDSL on AMD CDNA GPUs (MI300X gfx942, MI350 gfx950).”

— opening of SKILL.md by ROCm, Custom licence
name
gemm-optimization
allowed-tools
Read, Edit, Bash, Grep, Glob, Agent

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .claude/skills/gemm-optimization of ROCm/FlyDSL.

Open the folder on GitHubat commit 1941889

Compare with similar skills

Gemm Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gemm Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gemm Optimization this skillROCm/FlyDSL287—~6.4kAutomated safety check: NotesCustom licence
Agent Matrix Optimizerruvnet/ruflo74k3 repos~1.8kAutomated safety check: PassMIT
SQL Optimizationgithub/awesome-copilot40k2 repos~2.3kAutomated safety check: PassMIT
Gemm Kernel OptimizationZJLi2013/awesome-kernel-skills102—~1.1kAutomated safety check: PassNone
B200 Gemm Optimization Laddermirage-project/mirage2.5k—~1.9kAutomated safety check: PassApache-2.0
Agent Performance Optimizerruvnet/ruflo74k2 repos~3.6kAutomated safety check: PassMIT

Similar skills

  • Agent skill for matrix-optimizer - invoke with $agent-matrix-optimizer

    74k GitHub starsUsed in 3 repos~1.8k tokens
    Auto-check passed
  • SQL Optimization

    github/awesome-copilot

    Official

    Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…

    40k GitHub starsUsed in 2 repos~2.3k tokens
    DatabasesAuto-check passed
  • Gemm Kernel Optimization

    ZJLi2013/awesome-kernel-skills

    Optimize dense matrix multiplication (GEMM) kernels in Triton for NVIDIA and AMD GPUs.

    102 GitHub stars~1.1k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • B200 Gemm Optimization Ladder

    mirage-project/mirage

    A skill your agent uses when the user wants to implement from scratch, port, or systematically optimize a B200/Blackwell GEMM.

    2.5k GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Agent skill for performance-optimizer - invoke with $agent-performance-optimizer

    74k GitHub starsUsed in 2 repos~3.6k tokens
    Auto-check passed
  • Database Optimizer

    davila7/claude-code-templates

    Expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures.

    32k GitHub starsUsed in 7 repos~2.5k tokens
    DatabasesAuto-check passed

More from ROCm/FlyDSL

All 19 skills in this repo
  • Llvm

    ROCm/FlyDSL

    Tune and analyse a FlyDSL kernel at the LLVM level: pick a compile hint, function attribute, or AMDGPU backend flag, then PROVE it reached codegen.

    287 GitHub stars~4.9k tokensUpdated today
    Auto-check: notes
  • Detect per-kernel GPU resource regressions (VGPR, SGPR, register spills, scratch, static LDS) by diffing the final ISA before and after a change, using its isaresourcetable.py helper.

    287 GitHub stars~2.7k tokensUpdated today
    Auto-check: notes
  • API Stability

    ROCm/FlyDSL

    Review a FlyDSL PR, commit, branch, kernel, or consuming module for API-stability compliance.

    287 GitHub stars~3.2k tokensUpdated today
    Auto-check: notes
  • Build Rocm Image

    ROCm/FlyDSL

    Connect to a remote host via SSH and build a Docker image with rocprofv3, aiter, and FlyDSL.

    287 GitHub stars~1.2k tokensUpdated today
    Auto-check: notes
  • Debug FlyDSL GPU kernels that produce NaN, inf, wrong results, or crash.

    287 GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Guided step-by-step wizard for producing a new FlyDSL GPU kernel from a requirement: classify the kernel type, pick a skeleton, fill in compute, add control flow / sync / LDS, then test on GPU.

    287 GitHub stars~4.6k tokensUpdated today
    Auto-check: notes

Questions about Gemm Optimization

What does Gemm Optimization do?

Comprehensive guide to optimizing GEMM (General Matrix Multiply) kernels in FlyDSL on AMD CDNA GPUs. Gemm Optimization is an agent skill from ROCm/FlyDSL. Comprehensive guide to optimizing GEMM (General Matrix Multiply) kernels in FlyDSL on AMD CDNA GPUs.

How do I install Gemm Optimization in Claude Code?

Run `npx skills add ROCm/FlyDSL --skill gemm-optimization -a claude-code`. Or copy the skill folder (.claude/skills/gemm-optimization in ROCm/FlyDSL) into .claude/skills/gemm-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Gemm Optimization in Codex?

Run `npx skills add ROCm/FlyDSL --skill gemm-optimization -a codex`. Or copy the skill folder (.claude/skills/gemm-optimization in ROCm/FlyDSL) into .agents/skills/gemm-optimization in your project. Codex loads it when a task matches its description.

Can I use Gemm Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ROCm/FlyDSL --skill gemm-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gemm-optimization, .gemini/skills/gemm-optimization, .github/skills/gemm-optimization and .opencode/skills/gemm-optimization in your project.

What does Gemm Optimization need to run?

Going by SKILL.md and its folder, Gemm Optimization needs the command-line tools its instructions call (python). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Edit, Bash, Grep, Glob, Agent.

Does Gemm Optimization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gemm Optimization safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Gemm Optimization use?

Gemm Optimization has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Gemm Optimization use?

About 6.4k tokens (SKILL.md is roughly 26k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gemm Optimization?

Skills that share tags, products or a category with Gemm Optimization: Agent Matrix Optimizer (ruvnet/ruflo, 74k stars), SQL Optimization (github/awesome-copilot, 40k stars), Gemm Kernel Optimization (ZJLi2013/awesome-kernel-skills, 102 stars) and B200 Gemm Optimization Ladder (mirage-project/mirage, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gemm Optimization?

ROCm (a GitHub organization) maintains it in ROCm/FlyDSL, which has 287 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 7, 2026.

Source: ROCm/FlyDSL on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.