NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ParallelKernelBench: Can LLMs Write Fast Multi-GPU Kernels?

Willy Chan, Nathan Paek, Simon Guo, Simran Arora, Daniel Y FuDL4C @ ICML 2026

TL;DR

While LLMs have shown promise in writing single-GPU kernels, this paper reveals they struggle significantly with the complex world of multi-GPU optimization. The authors introduce ParallelKernelBench (PKB), a benchmark of 87 distributed workloads, and find that while frontier models currently fail on most tasks, they are capable of generating "net-new" optimized kernels that outperform standard production libraries like NVIDIA’s NeMo.

What Problem Does This Paper Address?

Modern AI models have outgrown the memory and compute of a single GPU. To run them, we must shard workloads across clusters, making inter-GPU communication (via NVLink or NVSwitch) the primary performance bottleneck.

While tools exist to help LLMs write single-GPU code (like Triton or CUDA), generating efficient multi-GPU kernels is much harder. It requires reasoning about a combinatorial design space of parallelism (Tensor, Expert, Pipeline, etc.), managing complex rank coordination, and choosing between various hardware paths (like the copy engine vs. SM load/store). Before this paper, there was no standardized way to measure if LLMs could handle these low-level distributed optimizations.

Methods

The authors developed a three-part framework to tackle this:

  1. A Taxonomy of Parallelism: They categorized distributed workloads into a structured map, covering everything from standard Transformer layers to GNNs and scientific computing.
  2. ParallelKernelBench (PKB): A suite of 87 problems where an LLM is given a "naive" PyTorch + NCCL (standard communication library) reference and tasked with rewriting it into a high-performance CUDA kernel using Unified Virtual Addressing (UVA) and symmetric memory.
  3. Communication-Aware Roofline Model: Standard performance analysis only looks at compute and memory. The authors extended this "roofline" to include interconnect bandwidth, allowing them to see exactly where a kernel is hitting a hardware ceiling.

They also tested an agentic harness, where a model (Gemini 3 Pro) was allowed to iterate on its code by seeing compiler errors and performance feedback in a loop.

Datasets

The primary dataset introduced is ParallelKernelBench (PKB). It consists of 87 diverse problems sourced from:

  • Production Libraries: NVIDIA NeMo, Megatron-LM, DeepSpeed, and FlashMoE.
  • Domain-Specific Repos: Sourced from GNN training, vision models (SAM3), and scientific simulations.
  • Baseline: All problems include a reference implementation using standard PyTorch and NCCL collectives.

Key Insights and Ideas

  • The "Reasoning" Bottleneck: LLMs don't just fail because of syntax; they fail because they can't reliably reason about how different GPU "ranks" coordinate. The shift from syntax errors to logic errors in frontier models suggests that "fluency" is solved, but "distributed logic" is not.
  • The Baseline is Surprisingly Low: The authors found that over 90% of standard PyTorch/NCCL baselines achieve less than 50% of peak hardware utilization. This highlights a massive "optimization gap" that manual tuning hasn't filled.
  • Defaulting to Simplicity: When LLMs do succeed, they tend to use simple communication primitives (like basic copies) and rarely utilize advanced hardware features like the Tensor Memory Accelerator (TMA) or in-switch reductions (NVLS).
  • Discovery of "Net-New" Kernels: In several cases, LLMs generated kernels for operations that didn't have optimized versions in open-source repositories. For example, a model fused log-softmax with an all-gather operation to create a kernel that was 2.06x faster than the reference.

Key Results

  • Low Success Rate: In single-shot attempts, the best models (GPT-5.5) only achieved correctness in 32% of cases.
  • Performance Gains: Only 25% of generated kernels actually beat the unoptimized PyTorch + NCCL baseline.
  • Agentic Improvement: Giving a model a "terminal" to test its code improved correctness from 24 to 31 solved problems, but it quickly hit a plateau.
  • Specific Speedups:
    • NeMo Vocab-Parallel Log-Prob: Up to 2.06x faster.
  • Hyena Context Parallel: Up to 1.72x faster.
  • SAM3 IoU Suppression: Up to 1.40x faster.
  • Ulysses Attention: Up to 1.83x faster.

Limitations and Future Work

  • Intra-node Focus: The benchmark currently focuses on communication within a single node (NVLink). It does not yet cover inter-node communication (InfiniBand/RoCE), which is even more complex.
  • Hardware Specificity: Evaluations were performed on NVIDIA H100s. Future work is needed to see how these results translate to other architectures like AMD (using ROCm) or Google’s TPUs.
  • Scheduling vs. Kernel Design: The paper deliberately excludes problems where performance is governed by high-level scheduling (like pipeline parallelism) to focus strictly on kernel-level optimization.
  • Advanced Primitives: There is a clear need for better training data or prompting techniques to help LLMs utilize advanced hardware features like TMA and warp-specialization.

Summary updated

BibTeX
@inproceedings{chan2026parallelkernelbench,
  author = {Willy Chan and Nathan Paek and Simon Guo and Simran Arora and Daniel Y Fu},
  title = {{ParallelKernelBench: Can LLMs Write Fast Multi-GPU Kernels?}},
  booktitle = {DL4C @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=4IGomFc9dx},
}
Figure