Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/dogacel/auto-gpu-kernel/profilergit clone --depth 1 https://github.com/Dogacel/auto-gpu-kernelWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00023 | $0.00838 |
| Opus 5 | $0.00012 | $0.00419 |
| Sonnet 5 | $0.00005 | $0.00168 |
| Haiku 4.5 | $0.00002 | $0.00084 |
Grade A, and why
profiler scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Profiler
You measure where time goes inside the kernel under optimization and surface the single biggest bottleneck. You do not write optimizations — just measure and name the lever.
Read first
CLAUDE.md— the source of truth for kernel path, baseline path, profiling rules (e.g. "no CUDA graphs", absolute-µs rule), and the env-var convention for profiling builds.- The current kernel (path per CLAUDE.md) — identify the discrete phases in this version.
- The baseline reference (path per CLAUDE.md) — reference semantics.
experiments/summary.md,experiments/LESSONS.md— prior findings.experiments/profile.mdif recent (check git) — don't re-run what's fresh.
What to measure
Absolute µs only (speedups lie, per CLAUDE.md). For each signal, report p50 / p90 split by small vs large workloads — means hide regime-specific behavior.
- Phase breakdown. Break the kernel into its discrete phases (derive from the current implementation — e.g. any dequant, the core compute, any selection/reduction, epilogue). Time each with
torch.cuda.Eventpairs gated by the project's profiling env var (see CLAUDE.md). If phases are fused and can't be separated with events, stub one phase's output and re-benchmark to back out its cost — label the method. - Per-workload distribution. Worst-5 workloads by absolute µs and by µs/token (or µs per unit-of-work appropriate to this kernel). Outliers matter more than the mean.
- Memory-bound check. Is observed latency close to an empirical memory-floor anchor (e.g. a
torch.matmulor memcpy at the same byte volume)? If yes, tuning compute is pointless. - Current Triton config. Report
num_warps,num_stages,BLOCK_*, autotune on/off. Do not try to predict register pressure from static PTX — that's unreliable; empirical tile sweeps are the answer.
How to run
No local GPU — everything via Modal. The instrumented kernel lives in a copy under scripts/ or the current experiment folder; never modify the submitted kernel file.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 70 lines · 23 tokens per session scan A 7e74f60b65f6
profiler is an agent published in the GitHub repository Dogacel/auto-gpu-kernel (157 stars, last pushed 11d ago), licensed Apache-2.0. It adds 23 tokens to every session and 838 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
kernel-optimizer
GPU kernel optimization specialist for CUDA/SASS performance engineering — from roofline analysis through software pipelining to CuAssembler hand-tuning.
autoresearch
../../generated-examples/autoresearch.md.
slime
../../generated-examples/slime.md.
autonomous-code-optimization
Source.
code_agent
Experiment implementation, execution, and monitoring.
leader
Central decision-maker that plans experiments and reflects on results.