Skip to Main Content

Modern Large Language Models spend up to 70% of their execution time stalled on GPU memory bandwidth. While PyTorch eager execution triggers intermediate High Bandwidth Memory (HBM) roundtrips for every simple operation, writing custom OpenAI Triton or CUDA C++ kernels requires scarce compiler engineering expertise. KernelForge is an autonomous, multi-agent compiler that ingests raw PyTorch operations, mathematically analyzes their operational intensity against the target GPU's memory roofline, and synthesizes memory-coalesced, fused OpenAI Triton kernels (@triton.jit). Unlike static code generators, KernelForge operates a closed-loop compilation and profiling harness: 1. Architect (Muse Wonder): Analyzes tensor AST and GPU hardware specs (NVIDIA A10G / T4) to calculate arithmetic intensity (I = FLOPs/Byte) and plan shared-memory tiling bounds (BLOCK_SIZE, warps, stages). 2. Synthesizer (Muse Code / Muse Spark 1.3): Translates the tiling plan into memory-coalesced @triton.jit source code with FP32 accumulator promotion and dynamic stride handling. 3. Auditor (Meta Open-Weights: Muse Spark Open on Modal): Deployed on Modal serverless GPUs, synthesizing property tests across tensor shape permutations and injecting numerical assertions (torch.testing.assert_close). 4. Subprocess-Isolated Sandbox: Executes kernels inside an isolated child process with CUDA_LAUNCH_BLOCKING=1 and a 20s watchdog, preventing CUDA driver context poisoning on memory faults. 5. Reflection Debugger (Agentic Self-Healing): Catches illegal memory accesses or numerical drift, parses the CUDA traceback, and autonomously patches boundary masks within 4 seconds. Empirical Benchmarks (Stanford KernelBench & LLaMA-3 Production Primitives): Evaluated following the methodology of Stanford's KernelBench (Level 1 & Level 2) and LLaMA-3 production workloads using triton.testing.do_bench: • Level-1 LLaMA-3 Fused RMSNorm: 2.86x speedup vs. eager, 1.24x vs. compile (86.8% memory bus saturation). • Level-1 Fused SwiGLU: 2.45x speedup vs. eager, 1.20x vs. compile (84.5% memory bus saturation). • Level-1 Safe Online Softmax: 2.41x speedup vs. eager, 1.22x vs. compile (82.0% memory bus saturation). • Level-2 Fused ResAdd + RMSNorm (Boss Problem): 3.79x speedup vs. eager, 1.42x vs. compile (91.4% memory bus saturation). • Self-Healing Stress Test (N=4097): Automatically caught unaligned pointer trap and self-corrected to 100% numerical parity (Pass@2). KernelForge is fully open-source with reproducible JSON artifacts and formal academic citations.

Team

jay9122

More from Meta Global AI Developer Hackathon

Cardo turns the world around you into Kurdish flashcards. Kurdish is spoken by tens of millions of people, but it has very few learning tools, and most…

Kurdolingo project preview

oqed is an LLM-guided superoptimizer for x86-64. You point it at a C or C++ project and it does the rest: - builds the project and runs its workload…

oqed project preview

Playtest Agent plays a game from screenshots, looks for bugs, then replays each report and has a judge check it. I make games alone. Solo developers and…

Adrian project preview

Open-source npm malware detection on Meta's models: a live monitor that flags new malware about a day before the public lists, a Muse agent that investigates…

Gatekeeper project preview

Video2URDF turns one short phone video of a real articulated object (a laptop lid, a drawer, a desk lamp, a microwave door) into a measured URDF/MJCF a robot…

Video2URDF project preview

Glimmer Scope opens up Muse Glimmer 30B so you can see and steer the concepts it thinks with. I trained sparse autoencoders on nine layers of Glimmer's…

Kroonen AI project preview