tuning-aiter

Tune GEMM and fused ops through aiter's gradlib tuner across hipblaslt, triton, flydsl, asm, and torch backends on AMD Instinct GPUs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Tuned GEMM configs in aiter often fail silently: CSV rows keyed to the wrong gfx/cu_num never match, tuners run on shapes the engine never dispatches, and wrappers can drop the tuned kernelName so the deployed kernel is not the one measured. This Skill provides the measured workflow to tune aiter ops and prove the tuned config actually engages in production. ## Core Features & Use Cases - Engagement verification: Use AITER_LOG_TUNED_CONFIG to harvest the exact (M,N,K) shapes the serving engine dispatches, then confirm tuned rows bind with is tuned on cu_num hits before measuring. - Cross-backend tuning: Run gradlib's gemm_tuner.py for dense bf16 or the per-op quantized tuners (fp8/int8/fp4/MoE) that race hipblaslt, triton, flydsl, ck/cktile, and asm candidates per shape. - Correct deployment: Write tuned CSVs into the installed package's configs/model_configs directory rather than the regenerated /tmp cache, and gate on the aiter >= v0.1.15 kernelName-dispatch fix. - Use Case: While serving an FP8 model on sglang with MI300X, harvest the dispatched GEMM shapes from the baseline log, tune exactly those rows, verify the production wrapper reproduces the tuner's recorded latency, and only then run the e2e A/B. ## Quick Start Ask the agent to tune the aiter GEMM configs for my sglang serving workload on this MI300X box and verify the tuned rows actually engage at runtime.

Frequently Asked Questions about tuning-aiter

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

FAQPage Schema
How do I tune aiter GEMM configs for vLLM or SGLang serving?

Enable AITER_LOG_TUNED_CONFIG=1, run the real workload, and harvest the dispatched (M,N,K) shapes from the log. Tune exactly those rows with gradlib's gemm_tuner.py for dense bf16 or the per-op quantized tuner for fp8/int8, then deploy the CSV into the installed aiter package's configs directory.

Why does my aiter tuned config never get used at runtime?

Tuned CSV lookups match on both gfx and cu_num, so rows tuned for gfx950/256 never hit on an MI300X (gfx942/304). Also, /tmp/aiter_configs is a regenerated cache; write rows into the installed package's configs/model_configs directory instead.

What aiter version is required for blockscale GEMM tuning to deploy?

aiter v0.1.15 or later is required, since commit 7136b240e added kernelName-based dispatch for blockscale GEMM. On earlier builds the wrapper reads only libtype and drops kernelName, so a tuned row can deploy a far slower default instance.

Does the gradlib gemm_tuner work for fp8 or quantized GEMMs?

No. gradlib's gemm_tuner.py serves dense bf16 only. Quantized ops (fp8, int8, fp4, batched, MoE) use separate per-op tuners under csrc with different flags (-i/-o), no torch baseline candidate, and split-K disabled unless -k is passed.

Why did my tuned aiter config make serving throughput worse?

A config hit proves the CSV row was found, not that the tuned kernel executed. On builds where the wrapper drops kernelName, the deployed kernel can be much slower than the tuned one; verify by timing the production entry point against the tuner's recorded latency before running e2e A/B tests.