profiler

profiler is an agent for Claude Code from Dogacel/auto-gpu-kernel. It costs 23 tokens per session (838 once invoked), scanned A, original, Apache-2.0.

A benchmarking assistant for measuring where a Triton GPU kernel spends time and identifying its main compute, memory, or launch bottleneck. Triton is a programming language and tool for writing GPU code.

In plain words
What is it for?
Use it to measure kernel phases and report p50 and p90 runtimes for small and large workloads, then name the biggest optimization target without changing the code.
Why use it?
It replaces guesses about why a GPU kernel is slow with timing measurements split by workload size.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md.

Good fit Use it to measure kernel phases and report p50 and p90 runtimes for small and large workloads, then name the biggest optimization target without changing the code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dogacel/auto-gpu-kernel/profiler
Install

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.

Clone the repo
git clone --depth 1 https://github.com/Dogacel/auto-gpu-kernel

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for profiler

README.md
[![agentmods](https://agentmods.dev/badge/agents/dogacel/auto-gpu-kernel/profiler/github.svg)](https://agentmods.dev/agents/dogacel/auto-gpu-kernel/profiler)
Your own site
<a href="https://agentmods.dev/agents/dogacel/auto-gpu-kernel/profiler"><img src="https://agentmods.dev/badge/agents/dogacel/auto-gpu-kernel/profiler/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for profiler

Your own site · 80×15
<a href="https://agentmods.dev/agents/dogacel/auto-gpu-kernel/profiler"><img src="https://agentmods.dev/badge/agents/dogacel/auto-gpu-kernel/profiler.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 838 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.00838
Opus 5.5 $0.00009 $0.00335
Sonnet 5.5 $0.00005 $0.00168
Haiku 4.5 $0.00002 $0.00084

Measured 1mo ago against content hash 7e74f60b65f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

archive/dsa_sparse_attention_h16_ckv512_kpe64_topk2048_ps64/.claude/agents/profiler.md · 70 lines

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.md if 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.

  1. 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.Event pairs 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.
  2. 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.
  3. Memory-bound check. Is observed latency close to an empirical memory-floor anchor (e.g. a torch.matmul or memcpy at the same byte volume)? If yes, tuning compute is pointless.
  4. 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.

Read the full file on GitHub · 70 lines

Changes

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.

  1. 1mo ago First seen · 70 lines · 23 tokens per session scan A 7e74f60b65f6

Subscribe to this mod's changes

profiler is an agent published in the GitHub repository Dogacel/auto-gpu-kernel (316 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 23 tokens to every session and 838 once invoked, about $0.0001 per session on Opus 5.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.