Back to directory

AutoMegaKernel (AMK)

An agent harness that compiles a model's whole forward pass into a single, provably correct, self-tuning CUDA megakernel that beats cuBLAS at batch-1 LLM decode on several GPUs.

AutoMegaKernel (AMK)

AutoMegaKernel is a general agent harness for GPU megakernel synthesis: a coding agent such as Claude Code or Codex drives it to compile a model into one self-retargeting megakernel covering the entire forward pass in a single persistent GPU launch, then self-tunes it, improving each time it runs. It inherits an autoresearch loop from its sibling project AutoKernel, which generates single best kernels rather than whole-model megakernels, and adds a new search axis over the scheduling.

A compile command imports a model, lowers it, validates the result for deadlocks and races, verifies it against eager execution, builds the GPU megakernel, measures it against the memory-bandwidth roofline, and emits a report. Its auto-tuned int8 megakernels beat CUDA-graphed cuBLAS bf16 at batch-1 decode across several NVIDIA inference-class GPUs, found autonomously by AMK's own correctness-gated search, though it currently trails on GPUs built for training such as the A100 and H100.

Coverage today is the HuggingFace Llama family on CUDA compute capabilities 7.5 through 12.0. It is written in Python and licensed under MIT.

More in Coding agents

See all 793
  • The City

    github.com

    A native macOS app that shows Claude Code runs as a city, with each project as a building, each team as a floor of robots, and every animation driven by a real event from the claude CLI's stream.

  • rig

    tryrig.ai

    A small, single-binary agent runtime that points at any OpenAI-compatible model, local or hosted, reads and edits a repository's code, runs its tests and remembers what it learned, with a loop implemented in a few hundred lines.

  • Jauvex

    jauvex.reindent.com

    An Electron desktop app that puts Claude Code, Codex and Grok coding-agent sessions side by side and lets you steer them by voice, with a small model handling fast routing decisions.