Overview
cute::TiledCopy represents a tiled copy operation that partitions data movement across multiple threads. It builds on Copy_Atom (hardware-level copy instructions like ldgsts, cp.async, TMA) by tiling them across threads and values.
Class Template
Template Parameters
Copy_Atom<CopyOperation, InternalType>
The atomic copy operation (e.g., SM80_CP_ASYNC_CACHEALWAYS for async copy).
Layout
The (thread_id, value_id) -> coordinate layout specifying how threads and values map to coordinates.
Shape
The shape of the coordinate space being tiled (typically 2D for matrix operations).
Source Location
include/cute/atom/copy_atom.hpp:182-355
Member Types
Value Type
Layout Types
Thread and Value Counts
Member Functions
Tensor Partitioning
tidfrg_S()
(M,N,...) to shape (Thr,(FrgV,FrgX),(RestM,RestN,...)).
Parameters:
stensor: The source tensor to partition
tidfrg_D()
(M,N,...) to shape (Thr,(FrgV,FrgX),(RestM,RestN,...)).
Parameters:
dtensor: The destination tensor to partition
Thread Slicing
get_slice()
ThrCopy object for a specific thread index.
Parameters:
thr_idx: Thread index within the TiledCopy
ThrCopy<TiledCopy, ThrIdx> for per-thread copy operations
Example:
get_thread_slice()
get_slice(). Returns per-thread copy object.
Layout Accessors
get_layoutS_TV()
get_layoutD_TV()
Retiling
retile()
ThrCopy - Per-Thread Copy
ThrCopy Methods
partition_S()
((FrgV,FrgX),(RestM,RestN,...))
Example:
partition_D()
((FrgV,FrgX),(RestM,RestN,...))
retile_S()
retile_D()
Common Copy Atoms
Ampere (SM80)
Hopper (SM90)
Factory Functions
make_tiled_copy()
copy_atom: The atomic copy operationlayout_tv: (thread, value) layouttiler_mn: Shape to tile in (M, N) dimensions
Usage Examples
Basic TiledCopy Setup
Global to Shared Memory Copy
Shared to Register Copy
Multi-Stage Pipeline with TiledCopy
TMA Copy (Hopper SM90)
Custom Copy Pattern
See Also
- cute::Tensor - Tensor type used with TiledCopy
- cute::Layout - Layout fundamentals
- cute::TiledMma - Tiled matrix multiply operations