Inference Engineering

IX. Kernels & GPU Programming

The GPU code underneath the engines.

49 entries · 5 subsections

Editor’s pick

IX.1 Kernel Libraries 16

  1. FlashAttention Library

    IO-aware exact attention kernels; FA3 targets Hopper and FA4, written in CuTe DSL, targets Blackwell.

    BSD-3-Clause · 25k stars · Updated 2026-11

  2. FlashInfer Library

    Attention, sampling, MoE, and GEMM kernels built for LLM serving, with JIT-compiled variants used as backends by vLLM and SGLang.

    Apache-2.0 · 7k stars · Updated 2026-11

  3. CUTLASS Library

    NVIDIA's C++ templates and CuTe layout abstractions for GEMM-class kernels, plus the Python CuTe DSL, from Ampere through Blackwell.

    BSD-3-Clause · 11k stars · Updated 2026-11

  4. DeepGEMM Library

    DeepSeek's JIT-compiled tensor-core kernels for FP8, FP4, and BF16 GEMMs, grouped MoE GEMMs, and MoE fused with communication.

    MIT · 9.2k stars · Updated 2026-11

  5. FlashMLA Library

    DeepSeek's sparse and dense MLA attention kernels with FP8 or FP4 KV cache, for Blackwell GPUs and Ascend NPUs (Hopper in older releases).

    MIT · 13k stars · Updated 2026-10

  6. Transformer Engine Library

    Transformer layers and scaling recipes for FP8, MXFP8, and NVFP4 execution on Hopper and Blackwell, with PyTorch and JAX bindings.

    Apache-2.0 · 3.6k stars · Updated 2026-11

  7. ThunderKittens Library

    Tile primitives embedded in CUDA C++ for writing attention and GEMM kernels; version 2.0 adds Blackwell, MXFP8, and NVFP4 support.

    MIT · 3.8k stars · Updated 2026-09

  8. QuACK Library

    Norm, softmax, cross-entropy, and GEMM-with-epilogue kernels written in CuTe DSL by the FlashAttention authors, for Hopper and Blackwell.

    Apache-2.0 · 1.2k stars · Updated 2026-11

  9. AITER Library

    AMD's operator library for inference and training on ROCm, combining Triton, Composable Kernel, and hand-written assembly backends.

    MIT · 621 stars · Updated 2026-11

  10. Composable Kernel Library

    AMD's C++ templates for tiled GEMM, attention, and fused operators on Instinct GPUs; the source now lives in the rocm-libraries monorepo.

    476 stars · Updated 2026-11

  11. HipKittens Library

    ThunderKittens-style tile primitives for AMD CDNA 3 and CDNA 4 GPUs, also shipped as a kernel backend inside AITER.

    MIT · 487 stars · Updated 2026-10

  12. SageAttention Library

    Quantized attention kernels (INT8 QK, FP8 PV, FP4 on Blackwell) that replace FlashAttention without retraining, common in video diffusion.

    Apache-2.0 · 4k stars · Updated 2026-01

  13. Kernels (Hugging Face) Library

    Loader and build tooling that fetches precompiled, version-pinned compute kernels from the Hugging Face Hub at runtime.

    Apache-2.0 · 792 stars · Updated 2026-11

  14. TileKernels Library

    DeepSeek's TileLang kernels for MoE routing, FP8 and FP4 quantization, Engram gating, and hyper-connections on NVIDIA GPUs and Ascend NPUs.

    MIT · 2.1k stars · Updated 2026-10

  15. DeepSelect Library

    Top-k selection kernels for the lightning indexer in DeepSeek Sparse Attention and for token samplers, on CUDA and Ascend.

    MIT · 550 stars · Updated 2026-09

  16. Marlin Library

    Reference FP16xINT4 mixed-precision GEMM kernel for small-batch decoding; maintained Marlin variants now ship inside vLLM.

    maintenance · Apache-2.0 · 1.2k stars · Updated 2024-09

IX.2 Kernel Languages & DSLs 13

  1. Triton Tool

    Python-embedded language and compiler for writing tiled GPU kernels, with Gluon as a lower-level layer.

    MIT · 21k stars · Updated 2026-11

  2. CUDA Programming Guide Docs

    NVIDIA's normative reference for the CUDA execution model, memory hierarchy, C++ language extensions, and per-architecture features.

  3. PTX ISA Spec

    Specification of NVIDIA's virtual instruction set and memory model, including async-copy, TMA, wgmma, and tcgen05 instructions.

  4. CUDA C++ Best Practices Guide Docs

    Official optimization workflow for CUDA C++ covering memory coalescing, shared memory, occupancy, and the assess-parallelize-optimize cycle.

  5. CuTe DSL Docs

    Python DSL exposing CUTLASS's CuTe layouts and tensor-core atoms with JIT compilation; FlashAttention-4 and QuACK are written in it.

    11k stars · Updated 2026-11

  6. Triton Tutorials Docs

    Official worked kernels from vector add through fused softmax, grouped matmul, fused attention, persistent and block-scaled matmul.

  7. Gluon Docs

    Lower-level Triton programming model that makes layouts, warp specialization, and target-specific features explicit to the kernel author.

  8. cuTile Python Tool

    NVIDIA's tile-level Python kernel language, compiled through the MLIR-based CUDA Tile IR rather than written as per-thread SIMT code.

    Apache-2.0 · 2.2k stars · Updated 2026-11

  9. TileLang Tool

    Python tile DSL built on TVM for writing GPU and accelerator kernels with explicit pipelining, used by DeepSeek's TileKernels.

    MIT · 9k stars · Updated 2026-11

  10. Helion Tool

    PyTorch-native kernel DSL that lowers tiled Python code to Triton and autotunes across many implementation choices.

    BSD-3-Clause · 997 stars · Updated 2026-11

  11. Pallas Docs

    JAX extension for writing custom kernels that lower through Mosaic on TPUs and through Triton or Mosaic GPU on NVIDIA GPUs.

    Apache-2.0 · 37k stars · Updated 2026-11

  12. NKI (Neuron Kernel Interface) Docs

    Tile-level Python kernel language for AWS Trainium and Inferentia NeuronCores with explicit control over on-chip memory and engines.

  13. Mojo GPU Programming Docs

    Guide to writing GPU kernels in Mojo, a Python-syntax systems language that targets NVIDIA, AMD, and Apple GPUs from one codebase.

    30k stars · Updated 2026-11

IX.3 Megakernels & Superoptimizers 4

  1. Mirage Persistent Kernel (MPK) Tool

    Compiler and runtime that turns a multi-GPU LLM forward pass into one persistent megakernel with SM-level task scheduling.

    Apache-2.0 · 2.6k stars · Updated 2026-11

  2. Mirage: A Multi-Level Superoptimizer for Tensor Programs Paper

    Searches kernel, thread-block, and thread-level program transformations to discover fused GPU kernels that hand-written rules miss.

    OSDI 2025 · Code

  3. Megakernels (Hazy Research) Tool

    ThunderKittens-based research megakernels that run a full Llama forward pass in a single launch to eliminate kernel-boundary stalls.

    experimental · MIT · 888 stars · Updated 2026-05

  4. TileRT Tool

    Tile-level runtime that splits LLM operators into fine-grained tasks and overlaps compute, I/O, and communication for low-latency decoding.

    experimental · MIT · 1.9k stars · Updated 2026-09

IX.4 Collective Communication 10

  1. NCCL Library

    NVIDIA's collective and point-to-point communication library over NVLink, PCIe, InfiniBand, and RoCE; the default PyTorch GPU backend.

    Apache-2.0 + BSD-3-Clause · 5.3k stars · Updated 2026-11

  2. NCCL Device API Docs

    Docs for NCCL's device-side API, which lets kernels issue communication over NVLink load/store, multicast, and GPU-initiated RDMA.

  3. NVSHMEM Library

    OpenSHMEM-style global address space for NVIDIA GPUs with one-sided puts, gets, atomics, and signals issued from inside kernels.

    Apache-2.0 · 607 stars · Updated 2026-11

  4. DeepEP Library

    Expert-parallel dispatch and combine kernels with high-throughput NVLink/RDMA modes for prefill and low-latency modes for decoding.

    MIT · 10k stars · Updated 2026-11

  5. RCCL Library

    AMD's NCCL-compatible collective library for Instinct GPUs over Infinity Fabric and RDMA; its source now lives in the rocm-systems monorepo.

    568 stars · Updated 2026-11

  6. UCCL Library

    GPU communication library with an NCCL/RCCL-compatible collective layer, P2P transfers for KV cache and weights, and GPU-driven EP.

    Apache-2.0 · 1.6k stars · Updated 2026-11

  7. pplx-garden Library

    Perplexity's RDMA transfer engine and point-to-point MoE dispatch/combine kernels for ConnectX and AWS EFA; supersedes pplx-kernels.

    MIT · 959 stars · Updated 2026-09

  8. MoonEP Library

    Expert-parallel communication library that equalizes per-rank token load by planning redundant experts online from router outputs.

    MIT · 1.2k stars · Updated 2026-10

  9. Triton-distributed Tool

    Triton extended with communication primitives for writing kernels that overlap computation with intra- and inter-node transfers.

    MIT · 1.6k stars · Updated 2026-11

  10. MSCCL++ Library

    GPU-driven communication stack with one-sided put, get, and signal primitives over NVLink, xGMI, and InfiniBand for custom collectives.

    MIT · 576 stars · Updated 2026-11

IX.5 AI-Generated Kernels & Kernel Benchmarks 6

  1. KernelBench Benchmark

    Stanford benchmark of PyTorch operators and models that LLMs must rewrite as correct, faster GPU kernels; introduced at ICML 2025.

    MIT · 1.3k stars · Updated 2026-03

  2. KernelBench-Verified Paper

    Shows how reward hacking inflates KernelBench speedups and adds TF32 baselines, hidden multi-distribution tests, and memory metrics.

    arXiv 2026

  3. FlashInfer-Bench Benchmark

    Kernel tasks and workloads captured from LLM serving, with tooling to swap verified AI-written kernels into SGLang and vLLM.

    Apache-2.0 · 311 stars · Updated 2026-09

  4. SOL-ExecBench Benchmark

    Scores AI-written kernels in several DSLs against an analytical B200 speed-of-light bound, with correctness and reward-hack checks.

    Apache-2.0 · 340 stars · Updated 2026-07

  5. KernelGuard Paper

    Integrity layer of static rules, physics-floor timing checks, and an LLM judge that catches reward-hacked submissions in kernel competitions.

    ICML 2026

  6. TritonBench Benchmark

    Operator benchmark suite that times Triton kernels against PyTorch eager, vendor libraries, and other baselines on standard inputs.

    BSD-3-Clause · 375 stars · Updated 2026-11