IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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

AsyncTileCopier

Trait for asynchronously copying a TileTensor between address spaces.

Distinct from TileCopier because async copies have semantics the synchronous trait cannot express: on NVIDIA the copy call only issues the transfer, and callers must commit it via async_copy_commit_group() and synchronize via async_copy_wait_all() or async_copy_wait_group() before reading the destination tile. Keeping the trait separate prevents code generic over TileCopier from silently accepting an async copier and producing reads that race the in-flight transfer, and gives the async path room to grow (e.g., explicit commit/wait members or multi-stage pipelining) as the async story is fleshed out.

Implemented traits​

AnyType

comptime members​

dst_address_space​

comptime dst_address_space

Destination AddressSpace the copier writes to.

src_address_space​

comptime src_address_space

Source AddressSpace the copier reads from.

Required 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, address_space=Self.src_address_space, linear_idx_type=src.linear_idx_type])

Asynchronously copies src into dst.

The copy may not be complete when this call returns; callers must commit and synchronize before reading dst.

Args:

Was this page helpful?