/aklr:geak-campaignfrom aklr
Optimizes AKLR schemas using AMD-AGI/GEAK instead of KernelForge. Prepares tasks with forge_task, converts to GEAK format, runs kernel_workflow, then stress-tests and publishes the optimized kernel back into AKLR.
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.
Read when SKILL.md points to them.
AKLR measures and GEAK optimizes. forge_task prepare turns the schema into a task whose driver.py checks a kernel
with aklr validate and times it with AKLR's own timer (harness/scripts/forge_task/README.md, step 1). This skill
gives that task GEAK's format: a config.yaml whose compile, correctness and performance commands run
task_runner.py, which calls the driver. GEAK's kernel_workflow then optimizes kernel.py against those commands,
and forge_task publish writes the kernel it ends with back into aklr/ops/.
git clone https://github.com/AMD-AGI/GEAK.git && GEAK_SKIP_BOOTSTRAP=1 pip install -e GEAK. Without
GEAK_SKIP_BOOTSTRAP the install clones GEAK a second time and installs another claude CLI.node GEAK/interface/runtime/engine/selftest.mjs
checks GEAK's runtime, with no GPU and no key.kernel_workflow/knowledge/, perf_knowledge/) and adds what a run learns to
kernel_workflow/knowledge/learned/ and kb_artifacts/ in its checkout. Its perf_knowledge_dir takes only
GEAK's layout, so AKLR's skills are not given to it. The agents read AKLR's rules through the task's program.md
and aklr/ops/README.md.Split regimes and pick a card as forge-loop-campaign says in "Before step 1". Keep a regime's schema file outside
the clone. From the AKLR clone's root:
RUN=~/aklr-runs/<run> S=harness/skills/geak-campaign
HIP_VISIBLE_DEVICES=0 python harness/scripts/forge_task prepare --schema <name> --run-dir $RUN --kernel-backend triton
# GEAK names the kernel, and the knowledge it records, after the task folder
T=$RUN/<schema name>
mkdir -p $T/scripts && cp $RUN/workspace/*.py $RUN/workspace/program.md $S/config.yaml $T/
cp $S/task_runner.py $T/scripts/
cd $T && for m in compile correctness performance; do
HIP_VISIBLE_DEVICES=0 python scripts/task_runner.py $m || break
done
The last line must print Compilation: PASS, Correctness: PASS and one Perf: line per workload. Read
$RUN/baseline.json: a workload whose baseline runs near AKLR's dispatch floor, about 4.1 µs, reads as parity in CI
whatever the kernel does (forge-loop-campaign, step 2). Tell the user which workloads those are.
Give GEAK one card per AKLR clone. Each correctness check writes the candidate into the clone, and GEAK's GPU lock keeps only the commands on one card from overlapping.
G=<GEAK checkout>
cat > $RUN/geak_args.json <<EOF
{"kernel_path": "$T", "workflow_dir": "$G/kernel_workflow", "budget": 6, "gpu_ids": "0", "exp_root": "$RUN/geak_exp",
"task": "An AKLR kernel: keep every workload correct under AKLR's validate; program.md has the contract and rules."}
EOF
cd $G && set -m && GEAK_CLAUDE_MODEL=claude-opus-5-5 nohup node interface/runtime/engine/run_workflow.mjs \
kernel_workflow/kernel_workflow.js --args-file $RUN/geak_args.json --result-file $RUN/geak_result.json \
> $RUN/geak.log 2>&1 &
budget is how many optimization directions GEAK may dispatch, over all rounds ($G/kernel_workflow/README.md).use <G>/kernel_workflow to optimize <T>, budget 6, gpu_ids 0, which the Workflow tool runs.$RUN/geak.log prints a === PHASE: line per phase and ends with COMPLETE. and
WORKFLOW_RESULT. A round of two directions took about 30 minutes on a small GEMM.E=$(python -c "import json, sys; print(json.load(open(sys.argv[1]))['eval_dir'])" $RUN/geak_result.json)
cp $(ls $E/optimized/*.py | grep -v '/driver\.py$') $RUN/workspace/
HIP_VISIBLE_DEVICES=0 python $RUN/workspace/driver.py --stress
python harness/scripts/forge_task publish $RUN
python -m aklr export check && python -m aklr validate --base origin/main <the path publish printed>
validation_status in geak_result.json is accepted and --stress ends with stress: PASS.
The rule and its reason are in forge-loop-campaign, "Steps 5 and 6".optimized/ holds every file of GEAK's kernel. A module GEAK adds must be imported relatively from kernel.py
(from .gemm import f), or publish leaves it out.tech_lead_report.md (each round's directions and the verified
speedups), and the regime's workloads near the dispatch floor.tech_lead_report.md and round_N/*/report.md into the knowledge base as harness/skills/aklr-kb/CONTRIBUTING.md says, in the
pull request that delivers the kernel.WORKFLOW_METRICS gives the agent count and the wall time only.Live execution tracker not started (non-fatal) in geak.log is the runtime's own and changes nothing.kernel_workflow/knowledge/learned/, kb_artifacts/). Two campaigns on one
checkout share what they learn.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub amd-agi/aklr --plugin aklr14 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.
/aklr-monitor-upstreamsMonitor configured upstream repositories for new kernels and optimizations, deduplicate candidates, and route them to the appropriate AKLR porting workflow. Use for scheduled or on-demand upstream change discovery./aklr-open-prOpen a AKLR pull request whose body carries the evidence each kind of change needs (contracts, kernels, code, withdrawn kernels, documents), following .github/pull_request_template.md and the review-tier check. Use when committing a AKLR change and opening or updating its PR./aklr-port-generated-kernelsPort agent-generated GPU kernels into AKLR with their provenance, dispatch, fallbacks, and review evidence. Use for kernels produced in generator repositories.Other plugins' skills for the same job