Skip to main content

Module tile

Module tile 

Source
Expand description

Tile module.

Modules§

allocate_bounce_tile
allocate_unit_tile
allocate_whitebox_fragment
cmma_allocate_acc
cmma_allocate_lhs
cmma_allocate_rhs
interleaved_allocate_acc
interleaved_allocate_lhs
interleaved_allocate_rhs
mask_layout_absolute_pos
mask_layout_num_units_per_row
matmul
Per-flavor tile matmul compute: *_execute, *_load_*, *_write_to_shared, plus the fragment readers/writers for each flavor. Tile data and matmul configs live alongside the corresponding data structures in [crate::tile::data].
mma_allocate_acc
mma_allocate_lhs
mma_allocate_rhs
mma_register_vector_sizes
planevec_allocate_acc
planevec_allocate_lhs
planevec_allocate_rhs
register_allocate_acc
register_allocate_lhs
register_allocate_rhs
rowwise
Row-wise tile compute. The Tile<E, Plane, ReadWrite> impl in [dispatch] routes per-variant row_max, row_sum, exp_diff, and rowwise_scale to the right backend; [reducer] handles the cross-unit plane reduction used by the WhiteboxFragment and BounceTile arms.
softmax_init_state
whitebox_fragment_absolute_pos
whitebox_fragment_zero_slice

Structs§

BounceConfig
Comptime configuration for BounceTile.
BounceTile
BounceTileExpand
CmmaMatmul
CmmaTile
CmmaTileExpand
Cube
Filled
Tile is a single value that gets filled in everywhere
FilledExpand
InterleavedMatmul
InterleavedTile
InterleavedTileExpand
MmaIOConfig
MmaMatmul
MmaTile
Single MMA tile carrier. The role (Lhs / Rhs / Acc) lives inside MmaFragment because each role’s fragment uses a different inner vector size (NL / NR / NA); the outer carrier holds the shared comptime metadata.
MmaTileExpand
Plane
PlaneVecMatInnerProduct
PlaneVecTile
PlaneVecTileExpand
RegisterMatmul
RegisterTile
RegisterTileExpand
RowWise
Contains one value per row of a fragment for which the unit contributes
RowWiseExpand
ScopeMarker
Zero-sized comptime marker used to carry a Scope generic through [Tile].
ScopeMarkerExpand
SharedTile
V-erased view over a shared-memory tile. Wraps a StridedTile and hides its vectorization from the type system. The underlying slice is downcast to a scalar Slice<E, IO> only at the Rust type level — the runtime vector_size on the cubecl slice is preserved, so projecting back via view::<V>() is a pure retype with no metadata change. V must match the original V the tile was wrapped with.
SharedTileExpand
Strided
Tile is a slice of memory with a stride
StridedExpand
StridedTile
Tile with a linear major dimension, and a strided minor dimension. Basic tile kind supported by all stage matmuls.
StridedTileExpand
Unit
UnitTile
UnitTileExpand
UnitTileLayout
Value
Wrapper over val to make enum work
ValueExpand
WhiteboxFragment
Assumes:
WhiteboxFragmentExpand
WhiteboxFragmentLayout
__NA
__NL
__NPlaneVec
__NR

Enums§

InnerLayout
LoadMethod
MaskLayout
Layout of an attention-style mask fragment across the units of a plane. Purely comptime — all variants carry only comptime data.
MmaFragment
MmaFragmentExpand
ProductType
Execution mode for the RegisterMatmul
ScopeKind
SoftmaxKind
Comptime descriptor for the row-shape used by online softmax. Determines how many rows per unit each running-state vector holds.
StoreMethod
Tile
TileExpand

Constants§

FULLY_MASKED_ROW_THRESHOLD
Any value smaller than this is considered numerically zero (used for fully-masked rows or tiny contributions). Value chosen to be above f16 smallest normal (~6.1e-5).
LOGIT_MASKED
Logits below this are considered masked (effectively -inf). Value chosen to fit within f16 range (~-65,504 max).

Traits§

Mask
Minimal mask abstraction used by row-wise tile operations. Returns true when the element at local_pos should be treated as masked (i.e. driven to -inf by Tile::scale_and_mask).
MaskExpand
Minimal mask abstraction used by row-wise tile operations. Returns true when the element at local_pos should be treated as masked (i.e. driven to -inf by Tile::scale_and_mask).
TileKind
Kind (family) of the tiles returned by a stage and ingested by a tile matmul reader
TileScope
Identifies which compute primitive executes a tile matmul.

Functions§

allocate_bounce_tile
Wraps a freshly built CmmaTile in a Tile::Bounce. Panics at expansion time unless Sc = Plane.
allocate_unit_tile
Allocates a Tile::Unit. The variant is valid in any scope — each unit just holds its own row-major copy of the tile.
allocate_whitebox_fragment
Allocates a Tile::WhiteboxFragment for the given scope. Panics at expansion time unless Sc = Plane.
assert_plane_scope
Comptime assertion that a tile-scope generic resolves to Plane.
assert_unit_scope
Comptime assertion that a tile-scope generic resolves to Unit.
cmma_allocate_acc
cmma_allocate_lhs
cmma_allocate_rhs
interleaved_allocate_acc
interleaved_allocate_lhs
interleaved_allocate_rhs
mask_layout_absolute_pos
Maps a per-unit (row, col) to its absolute position within the tile.
mask_layout_num_units_per_row
Returns how many units in a plane participate in the same row.
mma_allocate_acc
mma_allocate_lhs
mma_allocate_rhs
mma_register_vector_sizes
planevec_allocate_acc
planevec_allocate_lhs
planevec_allocate_rhs
register_allocate_acc
register_allocate_lhs
register_allocate_rhs
softmax_init_state
Initial running state (m, l) for the online softmax over a single tile row.
whitebox_fragment_absolute_pos
Maps a per-unit (row, col) to its absolute position within the tile described by layout.
whitebox_fragment_zero_slice
Zeroes a slice giving responsibility to units following layout.

Type Aliases§

NA
NL
NPlaneVec
NR