Prerequisites
Before you begin, ensure you have:- NVIDIA GPU with compute capability 7.0+ (Volta or newer)
- CUDA Toolkit 11.4 or higher (12.8+ recommended)
- C++17 compatible compiler (GCC 7.5+, Clang 7+, or MSVC)
- CMake 3.19+ (for C++ examples)
- Python 3.8+ (for Python interface)
For best performance and latest features, use CUDA Toolkit 12.8 or higher with a Hopper (H100) or Blackwell (B200/RTX 50 series) GPU.
C++ quick start
CUTLASS is a header-only library for C++, making it easy to integrate into your projects.1
Clone the repository
2
Set up environment variables
3
Create a basic GEMM program
Create a file named
my_gemm.cu:my_gemm.cu
4
Compile the program
Replace
compute_80,sm_80 with your GPU’s compute capability:- Ampere (A100):
compute_80,sm_80 - Ada (RTX 40xx):
compute_89,sm_89 - Hopper (H100):
compute_90a,sm_90a(note the “a” suffix) - Blackwell (B200):
compute_100a,sm_100a
5
Run the program
Building with CMake
For larger projects, use CMake:CMakeLists.txt
Python quick start
The CUTLASS Python interface provides a high-level API for running CUTLASS kernels from Python.1
Install the CUTLASS Python package
2
Create a Python GEMM script
Create a file named
my_gemm.py:my_gemm.py
3
Run the Python script
Advanced Python example
Here’s a more advanced example with mixed precision and custom epilogue:CuTe DSL quick start
CuTe DSL allows you to write CUDA kernels directly in Python.1
Set up CuTe DSL
2
Write a simple kernel
Next steps
Installation guide
Detailed installation instructions for all platforms
C++ examples
Explore 100+ example kernels
Python examples
Jupyter notebooks with Python examples
Performance profiling
Learn to profile and optimize kernels
Common issues
CUDA out of memory errors
CUDA out of memory errors
Reduce matrix dimensions or batch size. CUTLASS kernels can be memory-intensive for large problems.
Compilation errors about C++ standard
Compilation errors about C++ standard
Ensure you’re using C++17 or later:
Architecture mismatch errors
Architecture mismatch errors
Verify your GPU’s compute capability matches the
-gencode flags. For Hopper and Blackwell, use the “a” suffix (e.g., sm_90a).Python import errors
Python import errors
Ensure
cuda-python version matches your CUDA toolkit version: