Overview
cute::TiledMma represents a tiled matrix multiply-accumulate operation that partitions an MMA across multiple threads and values. It builds on MMA_Atom (hardware-level MMA instructions) by tiling them in the M, N, and K dimensions.
Class Template
Template Parameters
MMA_Atom<MMAOperation>
The atomic MMA operation (e.g., SM80_16x8x16_F16F16F16F16_TN for Ampere Tensor Cores).
Layout
The MNK-tiling of the Atom. Specifies how many atoms are tiled in M, N, and K dimensions.
Tile
default:"Tile<_,_,_>"
Optional permutations to apply to each MNK mode before tiling.
Source Location
include/cute/atom/mma_atom.hpp:202-457
Member Types
Value Types
Fragment Types
Layout Types
Member Functions
Tensor Partitioning
thrfrg_C()
(M,N,...) to shape ((ThrV,(ThrM,ThrN)),(FrgV,(RestM,RestN,...))).
Parameters:
ctensor: The C/D tensor to partition
thrfrg_A()
(M,K,...) to shape ((ThrV,(ThrM,ThrK)),(FrgV,(RestM,RestK,...))).
Parameters:
atensor: The A operand tensor to partition
thrfrg_B()
(N,K,...) to shape ((ThrV,(ThrN,ThrK)),(FrgV,(RestN,RestK,...))).
Parameters:
btensor: The B operand tensor to partition
Thread Slicing
get_slice()
ThrMMA object for a specific thread index.
Parameters:
thr_idx: Thread index within the TiledMMA
ThrMMA<TiledMMA, ThrCoord> for per-thread operations
Example:
get_thread_slice()
get_slice(). Returns per-thread MMA object.
Layout Accessors
get_layoutC_TV()
get_layoutA_TV()
get_layoutB_TV()
Utility
tile_size_mnk()
ThrMMA - Per-Thread MMA
ThrMMA Methods
partition_C()
(FrgV,(RestM,RestN,...))
partition_A()
(FrgV,(RestM,RestK,...))
partition_B()
(FrgV,(RestN,RestK,...))
partition_fragment_C()
partition_fragment_A()
partition_fragment_B()
Factory Functions
make_tiled_mma()
mma_atom: The atomic MMA operationthr_layout: Thread layout in (M, N, K) specifying the tilingpermutations: Optional permutations for each mode
Common MMA Atoms
Ampere (SM80) Tensor Cores
Hopper (SM90) Tensor Cores
Usage Examples
Basic TiledMMA Setup
Partitioning Tensors
Complete GEMM Kernel Outline
Multi-stage Pipeline
See Also
- cute::Tensor - Tensor type used with TiledMma
- cute::Layout - Layout fundamentals
- cute::TiledCopy - Tiled copy operations