For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
create_tma_tile_template
def create_tma_tile_template[dtype: DType, tile_shape: Coord[tile_shape.element_types], /, swizzle_mode: TensorMapSwizzle = TensorMapSwizzle.SWIZZLE_NONE, *, __tile_shape: Coord[__tile_shape.element_types] = tile_shape, __desc_shape: Coord[__desc_shape.element_types] = _default_desc_shape[dtype, tile_shape, swizzle_mode]()]() -> TMATensorTile[dtype, __tile_shape, __desc_shape]
Same as create_tma_tile expect the descriptor is only a placeholder or a template for later replacement.
specification of data type, rank, and layout orientation. It supports both 2D and 3D tensors and provides fine-grained control over the memory access patterns.
Constraints:
- Only supports 2D and 3D tensors (rank must be 2 or 3).
- For non-SWIZZLE_NONE modes, the K dimension size in bytes must be a multiple of the swizzle mode's byte size.
- For MN-major layout, only SWIZZLE_128B is supported.
- For 3D tensors, only K-major layout is supported.
Parameters:
- dtype (
DType): DType The data type of the tensor elements. - tile_shape (
Coord[tile_shape.element_types]): Coord The shape of the tile to be transferred, as a flatCoord. - swizzle_mode (
TensorMapSwizzle): TensorMapSwizzle = TensorMapSwizzle.SWIZZLE_NONE The swizzling mode to use for memory access optimization. - __tile_shape (
Coord[__tile_shape.element_types]): Coord = tile_shape Internal parameter for the tile shape in shared memory. - __desc_shape (
Coord[__desc_shape.element_types]): Coord = _default_desc_shape[...] Internal parameter for the descriptor shape, which may differ from the tile shape to accommodate hardware requirements.
Returns:
TMATensorTile[dtype, __tile_shape, __desc_shape]: A TMATensorTile configured with the specified parameters, ready for use in
asynchronous data transfer operations.
Raises:
If TMA descriptor creation fails.