tuning-core

Guides the six-step loop for tuning GEMM and GPU ops on AMD Instinct accelerators.

178|52|Updated Jul 30, 2025
One-click install
npx skills add https://github.com/AMD-AGI/GEAK --skill tuning-core-amd-agi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tuning-core
Source: https://github.com/AMD-AGI/GEAK/tree/main/perf_knowledge/expert_skills/tuning/tuning-core
Command: npx skills add https://github.com/AMD-AGI/GEAK --skill tuning-core-amd-agi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? GPU kernel tuning efforts frequently report speedups that never materialize in production because tuned configs fail to engage, measurements are noisy or wrong, or correctness is never gated. This Skill provides the language-agnostic discipline that prevents those failures. ## Core Features & Use Cases - Six-step tuning loop: Scope, Baseline, Search, Gate, Deploy, Verify — applicable to Triton, HIP, CK, hipBLASLt, aiter, and live vLLM/sglang servers. - Measurement rigor: Rules for synchronization, warmup, noise floors, interleaved A/B timing, and graph-captured benchmarking on gfx942/gfx950. - Correctness gating: Relative error metrics (err_ratio < 0.05) with per-dtype baselines and FP8 dialect (FNUZ vs OCP) checks. - Use Case: Before tuning a decode GEMM in a live sglang server, follow this loop to pin GPUs, measure the restart-level noise floor, prune the config space by LDS limits, gate on relative error, deploy the tuned CSV, and verify engagement via rocprofv3 kernel traces. ## Quick Start Read this skill first, then follow its six-step loop to tune my GEMM kernel and verify the tuned config actually engages in the live serving path.

Frequently Asked Questions about tuning-core

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

FAQPage Schema
How do I tune a GEMM kernel on AMD Instinct GPUs?

Follow the six-step loop: scope the op and shapes, baseline the current path, search a pruned config space, gate on relative correctness, deploy the artifact where the live path reads it, then verify engagement and re-measure end to end.

Why does my tuned config show no speedup in production?

The tuned artifact likely never engaged — lookup keys must match every field of the live call exactly, including bias flags and device names. Verify engagement with a profiler kernel trace or a library hit log before trusting any reported win.

Can I reuse tuned configs between MI300X and MI355X?

No. Tuned artifacts never transfer across architectures because CU counts, LDS budgets, and FP8 dialects differ between gfx942 and gfx950. Lookup keys often embed the CU count, so copied configs silently miss and fall back to defaults.

What correctness threshold should I use when tuning GPU kernels?

Use a relative metric, never absolute error, since absolute error grows with K. The AMD tuning tools convention is err_ratio < 0.05 against a higher-precision reference, with per-dtype baselines since bf16 and fp16 differ by about 8x.

Why do my benchmark results differ between runs on gfx950?

Clocks drift 13-17% during a run and rocm-smi clock pinning silently fails in containers. Interleave A/B candidates round-by-round instead of timing back-to-back, and measure your noise floor across process restarts for server changes.