CuTe DSL (CUTLASS Python) Documentation — Writing GPU Kernels in Python
by NVIDIA
NVIDIA's official guide to CuTe DSL, the Python front end of CUTLASS 4 for writing Ampere, Hopper and Blackwell kernels.
Overview
The CuTe DSL docs are the official reference for CUTLASS Python, the Python programming model NVIDIA added in CUTLASS 4.x that maps one-to-one onto CuTe C++ concepts; the overview page was last updated September 21, 2026. The material is organised as an Overview, a Quick Start (Linux x86_64 or aarch64, Python 3.10 to 3.14, CUDA 12.9 or 13.x, installed with pip install nvidia-cutlass-dsl), a DSL Programming Model section (code generation, control flow, JIT argument generation, layouts as JIT arguments, JIT caching and compile options), Guides (educational notebooks, MMA programming guides for warp-level Ampere/Ada, warpgroup Hopper and tcgen05 Blackwell instructions, framework integration with PyTorch and TVM FFI, debugging, IKET profiling, autotuning, ahead-of-time compilation), and an API reference covering CuTe core, tiled copies and MMA, pipelines for producer/consumer and warp-specialised kernels, plus an experimental task-scheduling layer. The companion notebooks in the NVIDIA/cutlass repo (about 10.6k stars, BSD-3-Clause) walk from elementwise add and layout algebra through composed layouts, async pipelines, CUDA graphs and autotuning to a tour of a speed-of-light GEMM. NVIDIA states kernels aim to match CUTLASS C++ performance but that some gaps may remain, and that the Python side does not yet include the full C++ profiler or library interface.
At a Glance
- Topic
- ML
- Level
- Advanced
- Format
- Documentation
- Cost
- Free
- Duration
- ~1 day for the quick start and first notebooks; several weeks to write a competitive GEMM or attention kernel
- Provider
- NVIDIA
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Install nvidia-cutlass-dsl and JIT-compile a first CuTe kernel callable from PyTorch
- ✓Express tiling and data movement with CuTe layout algebra, composed layouts and tensors
- ✓Write warp-level MMA kernels for Ampere and Ada and warpgroup MMA kernels for Hopper
- ✓Program Blackwell tcgen05 instructions and TMEM-based kernels with the architecture-specific APIs
- ✓Build producer/consumer pipelines and warp-specialised kernels with the pipeline API
- ✓Control JIT caching, compile options and ahead-of-time compilation for deployment
- ✓Profile kernels with IKET and autotune tile shapes using the provided benchmarking notebooks
- ✓Debug generated kernels and understand the documented limitations versus CUTLASS C++
Highlights
- •Official, current NVIDIA docs (updated September 2026) covering Ampere through Blackwell tcgen05 in one place
- •Runnable notebooks in the CUTLASS repo build from elementwise add to a speed-of-light GEMM tutorial
- •Same layout algebra as CUTLASS C++, so knowledge transfers both ways without template metaprogramming
- •Honest field report: one practitioner's FlashAttention-2 port reached 32.01 vs 41.55 TFLOP/s for PyTorch SDPA on an A10G, and found swizzled shared memory was the biggest single win
Who It’s For
Best For
- ✓Inference engineers writing custom attention, GEMM or fused kernels for Hopper and Blackwell
- ✓CUDA C++ developers who want faster iteration than C++ template compile cycles
- ✓ML systems engineers who need to read or modify CuTe-based kernels used by LLM serving stacks
Prerequisites
- •Solid CUDA programming: threads, warps, shared memory and bank conflicts
- •Familiarity with tiled matrix multiplication and Tensor Core MMA instructions
- •Python and PyTorch, plus a Linux machine with a recent NVIDIA GPU and CUDA 12.9 or newer
FAQ
What is CuTe DSL (CUTLASS Python) Documentation — Writing GPU Kernels in Python?
CuTe DSL is NVIDIA's documentation for writing high-performance GPU kernels in Python with the same layout algebra as CUTLASS C++. It is for inference and training engineers who already write CUDA and want custom GEMM, attention or fused kernels for Hopper and Blackwell GPUs without C++ template metaprogramming, JIT-compiled and called from PyTorch.
Is CuTe DSL (CUTLASS Python) Documentation — Writing GPU Kernels in Python free?
CuTe DSL (CUTLASS Python) Documentation — Writing GPU Kernels in Python is free to access.
What level is CuTe DSL (CUTLASS Python) Documentation — Writing GPU Kernels in Python for?
CuTe DSL (CUTLASS Python) Documentation — Writing GPU Kernels in Python is aimed at a advanced audience. Recommended background: Solid CUDA programming: threads, warps, shared memory and bank conflicts, Familiarity with tiled matrix multiplication and Tensor Core MMA instructions, Python and PyTorch, plus a Linux machine with a recent NVIDIA GPU and CUDA 12.9 or newer.
How long does CuTe DSL (CUTLASS Python) Documentation — Writing GPU Kernels in Python take?
Expect roughly ~1 day for the quick start and first notebooks; several weeks to write a competitive GEMM or attention kernel. Most learners work through it at their own pace.
What will I learn from CuTe DSL (CUTLASS Python) Documentation — Writing GPU Kernels in Python?
You'll learn: Install nvidia-cutlass-dsl and JIT-compile a first CuTe kernel callable from PyTorch; Express tiling and data movement with CuTe layout algebra, composed layouts and tensors; Write warp-level MMA kernels for Ampere and Ada and warpgroup MMA kernels for Hopper; Program Blackwell tcgen05 instructions and TMEM-based kernels with the architecture-specific APIs; Build producer/consumer pipelines and warp-specialised kernels with the pipeline API; Control JIT caching, compile options and ahead-of-time compilation for deployment; Profile kernels with IKET and autotune tile shapes using the provided benchmarking notebooks; Debug generated kernels and understand the documented limitations versus CUTLASS C++.
Topics
Sources
This page was written from 5 sources, 3 on domains other than docs.nvidia.com.