Dao-AILab/quack

A Quirky Assortment of CuTe Kernels

What it solves

Writing fast GPU kernels normally means hand-writing low-level CUDA C++ code. QuACK is a collection of high-performance CUDA kernels — normalization (RMSNorm, LayerNorm), Softmax, cross-entropy, and matrix multiplication (GEMM) with epilogues — written in Python using NVIDIA's CuTe-DSL. It targets the newest NVIDIA GPUs (Hopper and Blackwell) and supports CUDA 13 only.

How it works

The kernels are written in CuTe-DSL, NVIDIA's Python DSL from the CUTLASS project, which lets you express GPU kernels in Python instead of low-level CUDA C++. The memory-bound kernels (RMSNorm, Softmax, cross-entropy, LayerNorm) include both forward and backward passes. An optional extra installs NVIDIA matmul heuristics for better untuned GEMM configurations, and another optional extra adds JAX bindings for some kernels. The project also includes a blogpost explaining how to get memory-bound kernels to speed-of-light performance from Python.

Who it's for

Developers working on H100, B200/B300, or RTX 50 GPUs with CUDA toolkit 13.x and Python 3.12 who want fast, ready-made kernels for LLM-style workloads (normalization, softmax, cross-entropy, GEMM) without writing CUDA C++ by hand.

Highlights

  • Seven kernel families: RMSNorm, Softmax, Cross entropy, and LayerNorm (each with forward + backward), plus Hopper, Blackwell, and Blackwell GeForce GEMM with epilogues
  • Written in Python via CuTe-DSL — no hand-written CUDA C++ needed
  • Optional NVIDIA matmul heuristics for better untuned GEMM configs
  • Optional JAX bindings for some kernels
  • Installable via pip as quack-kernels
  • Includes performance benchmarks and a blogpost on reaching speed-of-light for memory-bound kernels

Related

  • Project
  • Project
  • Project
  • Project
  • Project