Skip to main content
Back

NVIDIA's CUTLASS 4.5 Ships Python GPU Kernels 1.41x Faster for AI Inference

CUTLASS 4.5 ships a simpler Python copy API, MXF8F6F4 mixed precision, and new MoE kernels with up to 1.41x speedup on Blackwell

Pro

Repo, Full Access
  • CUTLASS 4.5.x released: NVIDIA ships versions 4.5.0–4.5.2 of its GPU linear algebra library with Python DSL and C++ improvements.
  • New block_copy() API: Dramatically simplifies TMA and shared-to-tensor memory copy in CuTe DSL, removing significant boilerplate.
  • MoE GEMM speedups on B200: New grouped-GEMM examples show up to 1.41x speedup over PyTorch for mxfp8 workloads on Blackwell.
  • MXF8F6F4 mixed precision: BlockScaled MMA now supports MXF8*MXF4 and MXF8*MXF6 combinations for Blackwell kernels.
  • C++ gains: Up to 30% perf improvement on SM121 via new tile sizes; paged KV cache for Blackwell GQA; green context SM partitioning.
  • Install via pip: pip install nvidia-cutlass-dsl; free and open-source under BSD-3-Clause. Windows builds remain broken.

NVIDIA CUTLASS has shipped its 4.5.x release series, capping off with version 4.5.2. The headline additions span both sides of the library: the Python-native CuTe DSL gets a simpler memory-copy API and broader mixed-precision support, while the C++ side gains new Blackwell-specific tile sizes, green context partitioning, and paged KV cache support for attention kernels. For anyone writing custom GPU kernels for inference or training, there is a lot to unpack.

What CUTLASS Actually Is

CUTLASS is NVIDIA's open-source library of CUDA building blocks for high-performance linear algebra. Think of it as the layer between raw PTX assembly and framework-level operators like torch.matmul. CUTLASS decomposes matrix multiplication and related computations into reusable, modular software components and abstractions, with primitives that can be specialized via custom tiling sizes, data types, and algorithmic policy. It has been the engine behind cuBLAS and many deep learning framework kernels since 2017.

CUTLASS 4.0 introduced something new on top of the C++ template library: CuTe DSL, a Python-native interface for writing those same high-performance kernels. CUTLASS 4.x provides Python-native interfaces for writing high-performance CUDA kernels based on core CUTLASS and CuTe concepts without any performance compromises, allowing for a much smoother learning curve, orders of magnitude faster compile times, and native integration with DL frameworks without writing glue code. Under the hood, CUTLASS DSLs translate Python code into a custom intermediate representation (IR), which is then Just-In-Time (JIT) compiled into optimized CUDA kernels using MLIR and ptxas.

CUTLASS GEMM decomposition hierarchy showing tiling levels from thread block to warp to thread

The 4.5 Release in Plain English

The 4.5.0 drop is the most substantive of the three patch releases. Here is what changed in CuTe DSL:

  • New block_copy() API: A new Block API block_copy() simplifies TMA and S2T (shared-to-tensor) copy. Users can ignore details about multicast and 2CTA partition for TMA by using block_copy() and need not invoke tma_partition(), and can remove bulk of S2T initialization to simplify S2T copy. TMA (Tensor Memory Accelerator) is Hopper/Blackwell's hardware unit for asynchronously moving data between global and shared memory; previously wiring it up required significant boilerplate.
  • MXF8F6F4 mixed precision: BlockScaled MMA (matrix multiply-accumulate) now supports MXF8*MXF4 and MXF8*MXF6 combinations, expanding the microscaling format coverage for Blackwell kernels.
  • EFC broadcast semantics: Epilogue fusion functions can now broadcast and remap tensor modes using a subscript syntax like C.remap_modes[:, 0, 1], covering scalar broadcast, row/column broadcast, and arbitrary mode permutations including transpose. The PyTorch reference evaluator mirrors the same transformations.
  • Static type checker support: Improved type hints on CuTe DSL APIs now support tools like MyPy, making it easier to catch errors before JIT compilation.
  • Python 3.14t support (added in 4.5.2): Python 3.14t is now supported with GIL enabled.

New MoE Kernels With Real Numbers

The most practically significant addition for inference workloads is a new set of Mixture-of-Experts (MoE) GEMM examples in CuTe DSL. MoE is the architecture pattern used by models like Mixtral and DeepSeek, where only a subset of "expert" sub-networks activates per token, requiring grouped matrix multiplications with irregular shapes. The new implementation aligns with PyTorch's grouped_mm and scaled_grouped_mm interface.

Performance on B200 versus torch_210_cu13 shows meaningful gains across precision formats:

FormatAvg Speedup on B200
mxfp8 2D×3D1.29x
mxfp8 2D×2D1.41x
nvfp4 2D×3D1.11x
nvfp4 2D×2D1.12x
bf16 2D×3D1.15x
bf16 2D×2D1.17x

A key engineering detail: the implementation uses a cheap helper kernel (~2 microseconds) for expert-wise tensormap descriptor setup, avoiding the long latency that typically occurs during tile switching in grouped GEMMs.

Bar chart showing CUTLASS 3.5.1 GEMM peak performance improvements over CUTLASS 3.1 on H100 SXM5

What Changed on the C++ Side

The C++ template library also received several targeted improvements:

  • Blackwell SM120 tile sizes: New 128x32xK and 128x64xK tile sizes for SM120 blockscaled MMA collective builders, yielding up to 30% performance improvement on Blackwell SM121-related kernels.
  • Green context support (example 95): Enables launching GEMM on a stream with partial SM allocation, useful for latency-sensitive inference where you want to reserve GPU resources for other work.
  • Paged KV cache for Blackwell GQA: Example 93 (Blackwell low-latency GQA) now supports paged KV cache, a memory management technique used in production LLM serving systems like vLLM to avoid memory fragmentation.
  • 2SM MMA instruction support for mixed TMA+CpAsync SM100 GEMM kernels, with TMA multicast for A tiles when using non-trivial cluster sizes along the N dimension.

How to Get Started

CUTLASS is free and open-source under a BSD-3-Clause license. CUTLASS is a header-only template library and does not need to be built to be used by other projects; client applications should target CUTLASS's include/ directory in their include paths. For the Python DSL, installation is a single pip command:

pip install nvidia-cutlass-dsl

A minimal CuTe DSL kernel looks like this:

import cutlass.cute as cute
@cute.kernel
def my_kernel():
    tidx, _, _ = cute.arch.thread_idx()
    if tidx == 0:
        cute.printf("Hello from GPU\n")
@cute.jit
def host():
    my_kernel().launch(grid=(1, 1, 1), block=(32, 1, 1))
host()

CUTLASS performs best when built with the CUDA 12.8 Toolkit, though it supports everything back to CUDA 11.4. For Blackwell SM100 datacenter GPUs (B200, B300), you need CUDA 12.8 or later and must compile with the sm100a target architecture flag.

The Bigger Picture

CUTLASS 4.x bridges the gap between productivity and performance for CUDA kernel development. By providing Python-based DSLs to the powerful CUTLASS C++ template library, it enables faster iteration, easier prototyping, and a gentler learning curve for high-performance linear algebra on NVIDIA GPUs. The library sits in an interesting position relative to Triton: where Triton abstracts away the hardware hierarchy to make kernel writing accessible, CuTe DSL exposes it fully but from Python. If you're exploring GPU kernels for the first time, starting with Triton is strongly recommended. When you need to really get into the weeds, or want to reuse CUTLASS building blocks, CuTe DSL is a great option in Python, provided you're comfortable spelunking in GPU internals.

One known limitation worth flagging: CUTLASS 4.x builds are known to be down on Windows platforms for all CUDA toolkits, and the CUTLASS team is working on a fix. Linux is the only supported build environment for now. The CuTe DSL Quick Start Guide and the official changelog are the best places to track what lands in each release.