Mojo trait
TileLoader
Base trait for tile loading mechanisms in matrix multiplication.
This trait defines the interface for loading tiles from global memory to shared memory, abstracting over different hardware mechanisms.
Implemented traits
AnyType
,
UnknownDestructibility
Aliases
__del__is_trivial
alias __del__is_trivial
A flag (often compiler generated) to indicate whether the implementation of __del__
is trivial.
The implementation of __del__
is considered to be trivial if:
- The struct has a compiler-generated trivial destructor and all its fields
have a trivial
__del__
method.
In practice, it means that the __del__
can be considered as no-op.
Required methods
load_tile
load_tile(self: _Self, dst: LayoutTensor[_Self._dtype, layout, MutableAnyOrigin, address_space=AddressSpace(3), alignment=128], mem_barrier: UnsafePointer[SharedMemBarrier, address_space=AddressSpace(3)], coords: Tuple[UInt, UInt])
Load a tile from global memory to shared memory.
Args:
- dst (
LayoutTensor
): Destination tile in shared memory (must be 128-byte aligned). - mem_barrier (
UnsafePointer
): Memory barrier for synchronization. - coords (
Tuple
): Tile coordinates (row, column) in the source matrix.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!