Manuscript Offprint

arXiv:2611.04104

ModelBlaster: Closing the Performance Gap through Learning-Augmented Agents Across Models, Kernels and Hardware Backends

Shengjun Kris Dong, Dima Nikiforov, Sahil Modi, Sana Damani, Edward C Lin, Siva Kumar Sastry Hari, Christos Kozyrakis

MODELBLASTER: CLOSING THE PERFORMANCE GAP THROUGH LEARNING-AUGMENTED AGENTS ACROSS MODELS, KERNELLS AND HARDWARE BACKENDS

Kris Shengjun Dong1,2^{1,2}, Dima Nikiforov2^{2}, Sahil Modi1^{1}, Sana Damani1^{1}, Edward Lin1^{1}, Siva Kumar Sastry Hari1^{1}, Christos Kozyrakis1^{1}

1^{1}NVIDIA, 2^{2}University of California, Berkeley

ABSTRACT

Optimizing accelerator code across hardware architectures is difficult. ML compilers typically search predefined spaces of schedules and micro-kernels. Large language model (LLM)-guided kernel optimization can explore a broader design space, including alternative algorithms, operator decompositions, and hardware-specific techniques, achieving better performance than ML compilers on many problems. However, existing LLM agents generate solutions that are tied to a single programming interface, vendor toolchain, or accelerator family, and target kernel-level optimizations that don't leverage model-level transforms. Additionally, most of the experience gathered on one hardware target cannot be reused on another.

We present MODELBLASTER, a Memory-Augmented In-Context Reinforcement Learning (MAIC-RL) framework that optimizes data-parallel kernels across heterogeneous SIMD and SIMT accelerator targets. Its mutable policy is a persistent knowledge base, updated at inference time by Actor–Critic Textual Gradient Descent (AC-TGD). Its structured Knowledge Base maps performance states to actions, outcomes, and constraints, so experience gathered on one kernel, model, or hardware target can be reused on another. A model-level optimizer extends the kernel agent to whole models, so kernel-level knowledge can inform model-level decisions. The same loop and schema serve CUDA on NVIDIA GPUs, OpenCL on Qualcomm GPUs, and RVV intrinsics on RISC-V vector cores.

Leveraging the cross-target accumulated knowledge, MODELBLASTER achieves geometric-mean speedups of 1.85×1.85\times, 5.58×5.58\times, and 5.18×5.18\times on KernelBench Levels 1–3 on an L40S GPU, and 1.69×1.69\times on SOL-ExecBench Levels 1 and 2 on a B200 GPU, comparing to PyTorch. On Qualcomm Adreno GPUs it reaches 5.8×5.8\times over the vendor SDK and 1.7×1.7\times over Apache TVM, and on RISC-V vector cores 2.7×2.7\times over ExecuTorch with XNNPACK across 70 KernelBench problems.

References (66)