For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
GenericToLocalTileCopier
struct GenericToLocalTileCopier[thread_layout: Layout[thread_layout.shape_types, thread_layout.stride_types], *, num_threads: Int = thread_layout.size(), thread_scope: ThreadScope = ThreadScope.BLOCK]
A TileCopier that moves a tile from generic memory into registers.
Parameters
- thread_layout (
Layout[thread_layout.shape_types, thread_layout.stride_types]): Layout describing how threads are organized over the copy. - num_threads (
Int): Total number of threads in the thread block. Threads beyondthread_layout.size()do not participate. - thread_scope (
ThreadScope): Scope at which thread operations are performed.
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDeletable,
Movable,
TileCopier
comptime members
dst_address_space
comptime dst_address_space = AddressSpace.LOCAL
Destination AddressSpace this copier writes to.
src_address_space
comptime src_address_space = AddressSpace.GENERIC
Source AddressSpace this copier reads from.
Methods
copy
def copy(self, dst: TileTensor[Storage=dst.Storage, address_space=Self.dst_address_space, linear_idx_type=dst.linear_idx_type], src: TileTensor[Storage=src.Storage, linear_idx_type=src.linear_idx_type])
Copies src in generic memory into dst in local memory.
Masked bounds checking is not supported.
Args:
- dst (
TileTensor[Storage=dst.Storage, address_space=Self.dst_address_space, linear_idx_type=dst.linear_idx_type]): Destination tile in local memory. - src (
TileTensor[Storage=src.Storage, linear_idx_type=src.linear_idx_type]): Source tile in generic memory.