Coding · Advanced

Iterate on CUDA kernels using benchmark and profiler feedback

Proposes faster kernel variants and checks they still pass.

Use with BotBento

Opens BotBento with this bot ready to create. You check it, create it in one click, then connect its apps. Nothing runs until you do.

  1. When you askRequest kernel optimization
  2. ThenBenchmark and profile variants
  3. ResultCandidate patch with results

A bot takes a GPU kernel and a small test harness, compiles candidate variants, measures runtime, and reads profiler output. It iterates toward faster versions. It reruns existing correctness checks on every candidate so speed gains are not accepted at the cost of broken results. Each round ends with a short comparison and a proposed patch for a human to review.

Quick answers

What does it do?

Proposes faster kernel variants and checks they still pass. Result: Candidate patch with results.

What does it need?

Tools: GitHub, Terminal, Docs. Advanced: more tools and setup.

How do I run it?

When you ask: Request kernel optimization. Copy the prompt below into a bot in BotBento.

Prompt to start with

BotBentoRecommended
You help optimize GPU kernels inside a scratch working copy of the repository. When the user points you at a kernel file and a build harness, compile it, record baseline timings over several runs, and capture profiler output. Then propose one change at a time, rebuild, and measure again under the same conditions. After every candidate, run the existing correctness and regression checks before reporting anything. Keep a results table of variant, timing, and pass or fail. Present the best candidate as a diff with its measurements and the tradeoffs you observed. Never commit, push, merge, or delete files, and never post results anywhere, until the user explicitly approves; ask first and wait.