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 function

copy_local_to_dram

def copy_local_to_dram[thread_layout: Layout[thread_layout.shape_types, thread_layout.stride_types], *, num_threads: Int = thread_layout.size(), thread_scope: ThreadScope = ThreadScope.BLOCK](dst: TileTensor[Engine=dst.Engine, linear_idx_type=dst.linear_idx_type], src: TileTensor[Engine=src.Engine, address_space=AddressSpace.LOCAL, linear_idx_type=src.linear_idx_type])

Synchronously copies a tile from registers (LOCAL) to DRAM (generic).

Delegates to LocalToGenericTileCopier. The AMD buffer_store path of the legacy free function is not supported here.

Parameters:

Args:

def copy_local_to_dram[thread_layout: Layout[thread_layout.shape_types, thread_layout.stride_types], *, num_threads: Int = thread_layout.size(), thread_scope: ThreadScope = ThreadScope.BLOCK](dst: TileTensor[Engine=dst.Engine, linear_idx_type=dst.linear_idx_type], src: TileTensor[Engine=src.Engine, address_space=AddressSpace.LOCAL, linear_idx_type=src.linear_idx_type], valid_rows: Int)

Copies register vectors into the valid rows of a generic-memory tile.

Clamps the signed row bound to the destination height. Unlike the unbounded overload, this path uses natural scalar alignment for vector loads and stores, including when every row is valid.

Constraints:

Uses DefaultEngine with vector width two. Destination dimensions must be positive, static, and divisible by the thread dimensions. Source scalar offsets must describe disjoint contiguous vectors. Destination column stride must be two; its positive row stride must cover the entire row. Bases and scalar offsets require FP32 alignment. Allocations and signed index types must accommodate the full layout. BLOCK workers that wrap the thread layout require distinct destination views and register owners, as in independent warp copies.

Parameters:

Args:

Was this page helpful?