/aklr:forge-loop-campaignfrom aklr
Runs autonomous kernel optimization campaigns on AKLR schemas using KernelForge on MI355X (gfx950) hardware. Handles task preparation, forge-loop execution, monitoring, steering, checkpointing, and kernel publication.
Ships in aklr. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
From step 2 until the campaign ends, report progress to me every 15m; the timer's prompt also says to resume the loop if it crashed, and to ask me if it crashes again before finishing a round.
harness/scripts/forge_task/README.md § Run a campaign has the six steps and their commands: read it first and
follow it. This skill adds what you decide, and what you must not forget, when you run the campaign yourself
rather than a person at a terminal.
python -m kernelforge.cli forge-loop --help
must print help.--max-hours) and the model with the user if they did not give them: the agents spend
money from step 2 on.<op>/impls/<language>/<name>/<file>.json;
keep each regime's file outside the AKLR clone, e.g. ~/aklr-regimes/gemm/impls/flydsl/<name>/small_m.json. In
the clone, aklr export check in step 6 rejects it: its name is not its content hash.rocm-smi --showmeminfo vram, rocm-smi --showpids) and use it in steps 1, 2
and 5. Another process on the card makes every timing on it meaningless.Read $RUN/baseline.json first. AKLR's timer reads every dispatch at about 4.1 µs or more, because its bench runner
forces queue profiling, which costs that much per dispatch. A workload whose baseline runs near that floor reads as
parity in CI whatever the kernel does there (a 1.7 µs kernel against a 2.6 µs baseline read 4.09 against 4.10 µs).
Tell the user which workloads those are before you launch: the campaign can win nothing AKLR will show there.
You keep no terminal open, so start the loop in a process group of its own:
set -m # the run gets a process group of its own, which the agents it starts share
nohup $RUN/forge_loop.sh --max-hours 12 --model claude-opus-5-5 --gpu 0 \
--lanes 1 --no-experience-kb --no-kb-warmstart --no-pr-kb > $RUN/forge_loop.log 2>&1 &
echo $! > $RUN/forge_loop.pid
--gpu-pool N,M,…: before a round the run moves to a free card of
the pool, and waits while all are taken.tail $RUN/forge_loop.log, the dashboard, and each round's own account in
$RUN/workspace/forge_experiments/lessons/iter_NNN.md.touch $RUN/workspace/.stop. At once: kill -- -$(cat $RUN/forge_loop.pid), which
stops forge-loop and the agents it started; killing forge-loop alone leaves them running, and spending.pgrep -fa claude must list no agent of this run.forge_loop_resume.sh in place of
forge_loop.sh.$RUN/forge_loop.log ends with forge-loop's result.--gpus only when this machine runs this campaign alone.python $W/driver.py --stress must end with stress: PASS before you publish. AKLR's
validate gives a kernel the GPU alone, so it passes one that is right only while every workgroup of a launch is
resident: a split-K fold that polls for its partners and gives up with NaN. On a stream limited to part of the CUs
such a kernel returns NaN. Do not deliver it; tell the user, and have its fold made wait-free first.python harness/skills/aklr-kb/maintenance/kb_gaps.py $RUN/workspace lists the skill pages the
rounds opened and the questions they found no page for.aklr validate, the delivered commit, what forge-ablate said each kept
round is worth, and the skill's gaps.forge-distill's patch ($RUN/knowledge_patch/, for aklr-kb and its language folders) is a proposal. Review every item before it goes in, as
aklr-kb/CONTRIBUTING.md says:
$W/forge_experiments/: lessons/, analysis/, ablation.md),
FlyDSL's source or the ISA. A number carries the ruler it was taken with; a gain inside the noise, or measured by
another ruler than AKLR's, is not a gain.aklr-kb/CONTRIBUTING.md § Page kinds says,
and is reviewed in the kernel's pull request.python maintenance/kb_lint.py --errors-only and python maintenance/kb_index.py --check pass, and maintenance/kb_numbers_guard.py
accounts for every number an edited page gains or loses.What the campaign taught about the kernel goes into the pull request that delivers the kernel's schema file; a kernel held back keeps its knowledge back with it. What it taught about the method -- this skill, forge_task, its driver, a ruler -- goes into a pull request of its own that changes the method.
FLYDSL_RUNTIME_CACHE_DIR (default ~/.flydsl/cache). A glob such as
/tmp/flydsl* also deletes source trees.aklr-kb/pitfalls/profiler_misses_kernels.md.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
kernel-optimization, aklr, kernelforge, gpu-kernels, mi355x, gfx950
14 skills in this plugin
/aklr-bad-casesA list of mistakes agents have made in AKLR, with what to do instead and how to spot each one in a code change. Use when reviewing an AKLR change or opening its pull request. Add a case when a new mistake is found./aklr-build-runtime-imageBuild and validate a reproducible runtime image for an exact AKLR revision and declared ROCm stack. Use when kernel review, CI, or downstream qualification needs a traceable test environment./aklr-kbWhat makes a kernel fast on gfx950 (MI350/MI355X) inside AKLR, and how to write it in FlyDSL, Triton/Gluon or HIP (the flydsl/, triton/ and hip/ folders: limits, errors, debugging, each language's own guides). Includes a dense-GEMM package (fp8, MXFP4, MXFP8, bf16/fp16, int8, small-M shapes included): dispatch rounds and split-K, main-loop pipelines, LDS/swizzle/DMA data paths, XCD tile order and scheduling hints, epilogues, autotuning, attribution, correctness gates and A/B measurement. Also a MoE package (fused MoE at any token count, and the expert grouped GEMM: tile-to-group mapping, order under token skew, sorted-token rows, transposed operands and K varying per group, in bf16, fp8, MXFP8 and MXFP4), an attention package, symptom pages, pitfalls and delivered kernels, trace capture and analysis, perf-regression bisection, the CDNA4 (gfx950) ISA reference guide with guides to looking things up in it, and gfx942 (MI300X) GEMM notes. Use when optimizing a kernel in any of these languages, or finding out why one is slow or wrong.
npx claudepluginhub amd-agi/aklr --plugin aklrOther plugins' skills for the same job