cuda.coop.cutlass#
cuda.coop.cutlass provides CUB cooperative primitives inside CuTe kernels.
Threads in a block or warp load and store tiles, reduce or scan values,
rearrange payloads, sort or select keys, compare neighbors, count samples,
and decode runs. CuTe compiles the enclosing kernel and links the generated
CUB device functions into it.
import cuda.coop.cutlass as coop
The distribution is cuda-coop-cutlass. It contributes the
cuda.coop.cutlass package to the shared cuda namespace; cuda.coop
is its namespace parent.
Installation#
The standalone package requires CUTLASS DSL 4.9.0.dev1 or later in the 4.x series and CUDA 13 on Linux. Install from a checkout containing this project:
python -m pip install ./python/cuda_coop_cutlass
Use a compatible CUDA driver and toolkit. NVRTC compiles the CUB providers,
and the CuTe compiler must support external NVIDIA LTO-IR linking and
trace-finalization hooks. The wheel includes the required CCCL headers and
licenses. Package metadata selects the CuTe CUDA 13 libraries through the
nvidia-cutlass-dsl[cu13] dependency, including the 4.9.0.dev1 prerelease.
Start with the Programming Guide for a complete prefix-sum kernel and Programming concepts for participation, layouts, ownership, and storage. The Executable examples page shows executable programs with CPU reference checks and downloads. The API reference lists every operation and its controls. Developers new to CUTLASS can read Introduction to CUTLASS for cuda.coop Developers before the Developer Guide.
- Programming concepts
- Programming Guide
- Using the API
- CuTe values and supported features
- Runtime requirements
- A complete prefix-sum example
- Payloads, dtypes, and result ownership
- Helpers and compile-time values
- Block algorithms
- Block scratch and reuse
- Physical Warp Load and Store
- Logical Warp Load and Store
- Hierarchy queries and synchronization
- Compiled scalar device operators
- Reduce and Sum
- Scan
- Exchange layouts and scatter
- Block Shuffle
- Built-in Merge Sort
- Radix Sort and Rank
- TopK selection
- Batched Warp Reduction
- CUTLASS register payloads
- Comparing neighboring values
- Counting samples into bins
- Checking and tuning a kernel
- Launch dimensions and resources
- Run Length Decode
cuda.coop.cutlassAPI Reference- Executable examples
- Tensor Core and TopK interop
- Developer Guide
- Following a prefix sum
- Compiler requirements
- Compiler phases and handoffs
- Compiler integration
- Primitive families
- Planning the CUB call
- Exact launch facts
- One provider bundle per trace
- Scratch allocation after tracing
- Finding the implementation
- Debugger Walkthrough
- Working on a primitive
- Checking a change
- Introduction to CUTLASS for cuda.coop Developers
- Minimal CuTe DSL Integration Example
- Configuration
- FAQs
- Which package and import should I use?
- Why use
ThreadDatafor per-thread values? - What does Load return?
- How do I stage a tile in shared memory?
- When does
ThreadDataneed an explicit element type? - Who chooses a producer’s memory copy and synchronization?
- Does releasing storage wait for its users?
- Why use
TempStoragewithsharing="exclusive"? - Why or when would I provide my own
TempStorage? - Does TopK return sorted results?
- Does sorting each block sort the whole array?
- When should I use Adjacent Difference or Discontinuity?
- Can I zero-pad a partial Histogram tile?
- Does Histogram retain counters between calls?
- Why do windowed and bulk Run Length Decode use different calls?
- How do I pad run inputs and recognize the end of decoded output?
- How does Batched Warp Reduction differ from ordinary Reduce?
- Can thread-local work surround a collective?
- How do I carry a scan aggregate across loop iterations?
- How do I change a payload’s element type?
- Can I choose temporary storage inside a branch or loop?
- How do floating min/max and scan seeds handle NaN and infinity?
- Why does import work but kernel compilation fail?
- Glossary
- Visualizations