reCUDA is an experimental kernel search and runtime optimization workbench for CUDA LLM workloads.
It is the repo where we try to answer questions like:
Under the hood, reCUDA mixes retrieval, DSPy orchestration, PEPA / GEPA-style optimization, runtime patching, and a lot of benchmark bookkeeping to search over Triton, CUTLASS, and CUDA-adjacent kernel implementations.
This is not a polished compiler and it is not a universal autotuner. It is a practical, imperfect research system for generating, repairing, validating, benchmarking, and selectively shipping better kernels.
If you want the shortest description, reCUDA is a kernel research lab with a CLI.
45 verified Triton kernels across 6 model families. Full tables live in kernels/KERNELS.md.router subset, usually around 1.13x-1.23x overall in the repo-native BF16 decode proxy.rmsnorm release path is also exact-match-safe on the bounded suite and usually lands around 1.07x-1.21x.The current Nano 30B release framing is here: docs/release_nemotron_nano30b_router.md
These are the high-signal outcomes, not the full scoreboard.
| Family | What is working |
|---|---|
| Nemotron 3 Nano 30B-A3B | Best current runtime story. router and narrowed rmsnorm are the release-safe subsets today. |
| Nemotron 3 Super | Strong task-level coverage for the original 5 ops, plus shared expert projections. |
| Nemotron Cascade 2 30B-A3B | Task-level kernel coverage aligned with the Nano geometry. |
| Nemotron 3 Nano 4B | Good task-level and partial runtime coverage, but larger full patch sets still carry memory overhead. |
| Nemotron Nano 9B v2 | Dense-family task-level coverage for the core ops. |
| Qwen 3.5 | 14 checked-in kernels covering elementwise ops, projections, MoE expert projections, and DeltaNet. |
For raw kernel tables, latencies, and source provenance, see kernels/KERNELS.md.
Set up the repo-local environment:
uv venv --system-site-packages .venv
source .venv/bin/activate
uv pip install -e ".[openai,rlm,local-model,dspy,results-db,dev]"
export TRITON_PTXAS_PATH=/usr/local/cuda/bin/ptxas
Check the local stack:
cuda-rlm inspect-env
cuda-rlm presets
If you just want one real demo, start here:
cuda-rlm nano30b-router-release
That is the cleanest "show me a real runtime result" path in the repo right now.
cuda-rlm nano30b-router-release
cuda-rlm nano30b-rmsnorm-release
cuda-rlm nano30b-best-release \
--prompt-json artifacts/runtime-smoke/nemotron3-nano-30b-comparison-prompts.json
Important scope:
Single task:
cuda-rlm run \
--task cuda_rlm.tasks.qwen35_rmsnorm \
--preset codex-dspy \
--enable-retrieval \
--out-dir artifacts/qwen35-rmsnorm-run
PEPA optimization:
cuda-rlm optimize \
--task cuda_rlm.tasks.nemotron3_relu2 \
--out-dir artifacts/pepa-run \
--iterations 1 \
--children-per-iteration 1
Multi-task campaign:
cuda-rlm autodialectics \
--task cuda_rlm.tasks.nemotron3_rmsnorm \
--task cuda_rlm.tasks.nemotron3_rope \
--task cuda_rlm.tasks.nemotron3_relu2 \
--num-candidates 5 \
--repair-attempts 2 \
--enable-retrieval \
--out-dir artifacts/super-dialectics
autoresearch still exists as an alias, but autodialectics is the name to prefer now.
cuda-rlm run: one-task kernel search.cuda-rlm optimize: PEPA policy evolution over the search loop.cuda-rlm autodialectics: multi-task orchestration, scheduling, retrieval refresh, persistence.cuda-rlm nano30b-*: packaged release-style runtime benchmarks for the current Nano 30B path.cuda-rlm cutlass-bench: grouped GEMM benchmarking for CUTLASS binaries.results.duckdb: run outcomes and scoreboard storage.artifacts/kernel_index: retrieval index.artifacts/dspy/kernel-search-module: DSPy program state.The main search loop is no longer "prompt a model once and save the result."
reCUDA generally works like this:
Current backend guidance:
codex-dspy is the default path and the main supported search workflow.zai-glm5-dspy is the cheaper API-backed fallback.qwen-cli-dspy exists for local Qwen CLI exploratory runs.This part matters because the repo can look more finished than it really is.
The current weak spot is also clear from the benchmarks: standalone routed/shared expert projection patches on Nano 30B are not the obvious next public win. cuBLAS is hard to beat there unless the work becomes more fused or more architecture-specific.
# Inspect the local environment
cuda-rlm inspect-env
# List presets
cuda-rlm presets
# Run one task
cuda-rlm run --task cuda_rlm.tasks.qwen35_rmsnorm
# Run a multi-task search campaign
cuda-rlm autodialectics \
--task cuda_rlm.tasks.nemotron3_rmsnorm \
--task cuda_rlm.tasks.nemotron3_rope
# Benchmark CUTLASS grouped GEMMs
cuda-rlm cutlass-bench \
--json-output artifacts/runtime-smoke/cutlass-bench.json \
--markdown-output artifacts/runtime-smoke/cutlass-bench.md
# Benchmark a full layer against the best known kernel
cuda-rlm benchmark-layer --model qwen35
# Merge scattered DBs back into the main results store
cuda-rlm merge-results
kernels/ Checked-in Triton kernels by model family
src/cuda_rlm/
cli.py Main CLI
pipeline.py Search, validation, artifact capture
dspy_backend.py DSPy-backed generation path
autoresearch.py Legacy module name; autodialectics still routes through here
tasks/ Kernel task definitions
examples/ Seed candidates and runtime wrappers
pepa/ PEPA policy evolution
results_db.py DuckDB persistence
scripts/ Benchmark and smoke-test helpers
tests/ Unit and runtime-focused coverage
docs/ Release notes, runtime notes, architecture docs
The repo-local environment currently in use is:
3.12.32.10.0+cu1303.6.013.012.1, about 120 GiB VRAMAGENTS.mdkernels/KERNELS.mddocs/release_nemotron_nano30b_router.md12 commits
Python
98.6%
Shell
1.4%
reCUDA is an experimental kernel search and runtime optimization workbench for CUDA LLM workloads.
It is the repo where we try to answer questions like:
Under the hood, reCUDA mixes retrieval, DSPy orchestration, PEPA / GEPA-style optimization, runtime patching, and a lot of benchmark bookkeeping to search over Triton, CUTLASS, and CUDA-adjacent kernel implementations.
This is not a polished compiler and it is not a universal autotuner. It is a practical, imperfect research system for generating, repairing, validating, benchmarking, and selectively shipping better kernels.
If you want the shortest description, reCUDA is a kernel research lab with a CLI.
45 verified Triton kernels across 6 model families. Full tables live in kernels/KERNELS.md.router subset, usually around 1.13x-1.23x overall in the repo-native BF16 decode proxy.rmsnorm release path is also exact-match-safe on the bounded suite and usually lands around 1.07x-1.21x.The current Nano 30B release framing is here: docs/release_nemotron_nano30b_router.md
These are the high-signal outcomes, not the full scoreboard.
| Family | What is working |
|---|---|
| Nemotron 3 Nano 30B-A3B | Best current runtime story. router and narrowed rmsnorm are the release-safe subsets today. |
| Nemotron 3 Super | Strong task-level coverage for the original 5 ops, plus shared expert projections. |
| Nemotron Cascade 2 30B-A3B | Task-level kernel coverage aligned with the Nano geometry. |
| Nemotron 3 Nano 4B | Good task-level and partial runtime coverage, but larger full patch sets still carry memory overhead. |
| Nemotron Nano 9B v2 | Dense-family task-level coverage for the core ops. |
| Qwen 3.5 | 14 checked-in kernels covering elementwise ops, projections, MoE expert projections, and DeltaNet. |
For raw kernel tables, latencies, and source provenance, see kernels/KERNELS.md.
Set up the repo-local environment:
uv venv --system-site-packages .venv
source .venv/bin/activate
uv pip install -e ".[openai,rlm,local-model,dspy,results-db,dev]"
export TRITON_PTXAS_PATH=/usr/local/cuda/bin/ptxas
Check the local stack:
cuda-rlm inspect-env
cuda-rlm presets
If you just want one real demo, start here:
cuda-rlm nano30b-router-release
That is the cleanest "show me a real runtime result" path in the repo right now.
cuda-rlm nano30b-router-release
cuda-rlm nano30b-rmsnorm-release
cuda-rlm nano30b-best-release \
--prompt-json artifacts/runtime-smoke/nemotron3-nano-30b-comparison-prompts.json
Important scope:
Single task:
cuda-rlm run \
--task cuda_rlm.tasks.qwen35_rmsnorm \
--preset codex-dspy \
--enable-retrieval \
--out-dir artifacts/qwen35-rmsnorm-run
PEPA optimization:
cuda-rlm optimize \
--task cuda_rlm.tasks.nemotron3_relu2 \
--out-dir artifacts/pepa-run \
--iterations 1 \
--children-per-iteration 1
Multi-task campaign:
cuda-rlm autodialectics \
--task cuda_rlm.tasks.nemotron3_rmsnorm \
--task cuda_rlm.tasks.nemotron3_rope \
--task cuda_rlm.tasks.nemotron3_relu2 \
--num-candidates 5 \
--repair-attempts 2 \
--enable-retrieval \
--out-dir artifacts/super-dialectics
autoresearch still exists as an alias, but autodialectics is the name to prefer now.
cuda-rlm run: one-task kernel search.cuda-rlm optimize: PEPA policy evolution over the search loop.cuda-rlm autodialectics: multi-task orchestration, scheduling, retrieval refresh, persistence.cuda-rlm nano30b-*: packaged release-style runtime benchmarks for the current Nano 30B path.cuda-rlm cutlass-bench: grouped GEMM benchmarking for CUTLASS binaries.results.duckdb: run outcomes and scoreboard storage.artifacts/kernel_index: retrieval index.artifacts/dspy/kernel-search-module: DSPy program state.The main search loop is no longer "prompt a model once and save the result."
reCUDA generally works like this:
Current backend guidance:
codex-dspy is the default path and the main supported search workflow.zai-glm5-dspy is the cheaper API-backed fallback.qwen-cli-dspy exists for local Qwen CLI exploratory runs.This part matters because the repo can look more finished than it really is.
The current weak spot is also clear from the benchmarks: standalone routed/shared expert projection patches on Nano 30B are not the obvious next public win. cuBLAS is hard to beat there unless the work becomes more fused or more architecture-specific.
# Inspect the local environment
cuda-rlm inspect-env
# List presets
cuda-rlm presets
# Run one task
cuda-rlm run --task cuda_rlm.tasks.qwen35_rmsnorm
# Run a multi-task search campaign
cuda-rlm autodialectics \
--task cuda_rlm.tasks.nemotron3_rmsnorm \
--task cuda_rlm.tasks.nemotron3_rope
# Benchmark CUTLASS grouped GEMMs
cuda-rlm cutlass-bench \
--json-output artifacts/runtime-smoke/cutlass-bench.json \
--markdown-output artifacts/runtime-smoke/cutlass-bench.md
# Benchmark a full layer against the best known kernel
cuda-rlm benchmark-layer --model qwen35
# Merge scattered DBs back into the main results store
cuda-rlm merge-results
kernels/ Checked-in Triton kernels by model family
src/cuda_rlm/
cli.py Main CLI
pipeline.py Search, validation, artifact capture
dspy_backend.py DSPy-backed generation path
autoresearch.py Legacy module name; autodialectics still routes through here
tasks/ Kernel task definitions
examples/ Seed candidates and runtime wrappers
pepa/ PEPA policy evolution
results_db.py DuckDB persistence
scripts/ Benchmark and smoke-test helpers
tests/ Unit and runtime-focused coverage
docs/ Release notes, runtime notes, architecture docs
The repo-local environment currently in use is:
3.12.32.10.0+cu1303.6.013.012.1, about 120 GiB VRAMAGENTS.mdkernels/KERNELS.mddocs/release_nemotron_nano30b_router.md12 commits
Python
98.6%
Shell
1.4%