An open-source book and code collection of modern CUDA learning notes, with 200+ kernels covering HGEMM, FP8/FP4 GEMM, and Flash-Attention.
NVIDIA/cutlass
CUDA C++ template library and Python DSL for writing high-performance GEMM and related linear algebra kernels on NVIDIA GPUs.
- Stars
- 10,623
- Forks
- 2,133
- Open issues
- 785
- Last commit
- 3 hours ago
What is it?
CUTLASS is a collection of abstractions for implementing high-performance matrix-matrix multiplication (GEMM) and related computations within CUDA. It breaks the work into hierarchical, reusable components covering thread, warp, and threadblock levels, with tunable tiling sizes, data types, and algorithmic policies so they can serve as building blocks for custom kernels.
The C++ library supports a wide range of numeric types, including FP64, FP32, TF32, FP16, BF16, FP8, block-scaled FP4 and FP6 formats, and narrow integers, across NVIDIA Volta through Blackwell and Rubin architectures. CuTe, its core layout and tensor library, is used throughout the GEMM hierarchy.
CUTLASS 4 adds CuTe DSL, a Python-native interface for writing CUDA kernels based on CUTLASS and CuTe concepts, which is currently in public beta. The project also includes examples, unit tests, and a command-line profiler for running and comparing GEMM and convolution kernels.
Key features
- 01Hierarchical, reusable C++ templates for GEMM and convolution kernels
- 02CuTe layout and tensor abstractions for describing threads and data
- 03Support for FP64 through FP8, block-scaled FP4/FP6, and narrow integer types
- 04CuTe DSL for writing CUDA kernels in Python
- 05Command-line profiler for benchmarking GEMM and convolution kernels against cuBLAS
Use cases
- Building custom high-performance GEMM or fused kernels for deep learning workloads on NVIDIA GPUs
- Learning how tensor core GEMM kernels are structured and tuned
- Prototyping kernel designs in Python with CuTe DSL before production deployment
- Profiling and selecting GEMM or convolution kernel configurations for a given problem size
Quick start
- 1
Read the CUTLASS C++ Quick Start Guide
- 2
Read the CuTe DSL Quick Start Guide for the Python interface
Things to know
- The CuTe DSL is in public beta and has not yet graduated.
- Known code generation bugs affect some packed instructions on Rubin (sm107) GPUs.
- Requires NVIDIA GPUs and the CUDA toolchain.
- The license is not clearly detected in the metadata, so check the license terms before use.
Topics
FAQ
- What is cutlass?
- CUDA C++ template library and Python DSL for writing high-performance GEMM and related linear algebra kernels on NVIDIA GPUs. CUTLASS is a collection of abstractions for implementing high-performance matrix-matrix multiplication (GEMM) and related computations within CUDA. It breaks the work into hierarchical, reusable components covering thread, warp, and threadblock levels, with tunable tiling sizes, data types, and algorithmic policies so they can serve as building blocks for custom kernels.
- Is cutlass free to use? What license does it have?
- cutlass is open source under the Other license. Check the license terms before using it in commercial products.
- Is cutlass still maintained?
- Actively maintained. The last commit to cutlass was on Oct 20, 2026.
- What can I use cutlass for?
- Building custom high-performance GEMM or fused kernels for deep learning workloads on NVIDIA GPUs Learning how tensor core GEMM kernels are structured and tuned Prototyping kernel designs in Python with CuTe DSL before production deployment Profiling and selecting GEMM or convolution kernel configurations for a given problem size
- How do I install cutlass?
- Read the CUTLASS C++ Quick Start Guide Read the CuTe DSL Quick Start Guide for the Python interface
- Where can I get cutlass?
- The source code and installation instructions are on GitHub: https://github.com/NVIDIA/cutlass
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An end-to-end open source platform for building and deploying machine learning models, with Python and C++ APIs.
Official implementation of FlashAttention, a memory-efficient exact attention kernel for training and inference of Transformer models on GPUs.
LLM inference engine in plain C/C++ for running large language and vision-language models locally or in the cloud across many hardware backends.
A deep learning optimization library for making distributed training and inference of large models easier and more efficient.
A minimal deep learning framework with a PyTorch-like tensor API, autograd, a compiler, and support for many accelerator backends.