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 trait
TileIO
Extends TensorEngine with whole-tile loads and stores.
A conforming engine names a register value type that holds a whole tile,
TileValueType, and moves storage into and out of it. The layout travels
with the storage handle, as in TensorOps, so an engine whose storage
bakes in its extents can check them against the layout. TileTensor
exposes these as the zero-coordinate load() and store(value)
overloads.
Implemented traits
comptime members
TileValueType
comptime TileValueType[dtype: DType]
The register value holding a whole tile of dtype elements.
Parameters
- dtype (
DType): The element data type of the tile.
Required methods
load_tile
static def load_tile[mut: Bool, dtype: DType, origin: Origin[mut=mut], address_space: AddressSpace, LayoutType: TensorLayout, //](storage: Tuple[Self.StorageType[dtype, origin, address_space], LayoutType]) -> Self.TileValueType[dtype]
Loads the whole tile into a register value.
Parameters:
- mut (
Bool): The mutability of the storage, inferred fromorigin. - dtype (
DType): The element data type of the storage. - origin (
Origin[mut=mut]): The origin tracking the lifetime of the storage. - address_space (
AddressSpace): The address space the storage resides in. - LayoutType (
TensorLayout): The layout type of the tile.
Args:
- storage (
Tuple[_Self.StorageType[dtype, origin, address_space], LayoutType]): A tuple of the storage handle and its layout.
Returns:
_Self.TileValueType[dtype]: The tile's contents as a TileValueType[dtype].
store_tile
static def store_tile[dtype: DType, origin: MutOrigin, address_space: AddressSpace, LayoutType: TensorLayout, //](storage: Tuple[Self.StorageType[dtype, origin, address_space], LayoutType], value: Self.TileValueType[dtype])
Stores a register value over the whole tile.
Parameters:
- dtype (
DType): The element data type of the storage. - origin (
MutOrigin): The origin tracking the lifetime of the storage. - address_space (
AddressSpace): The address space the storage resides in. - LayoutType (
TensorLayout): The layout type of the tile.
Args:
- storage (
Tuple[_Self.StorageType[dtype, origin, address_space], LayoutType]): A tuple of the storage handle (modified in place) and its layout. - value (
_Self.TileValueType[dtype]): The register value to store.