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_sram_to_dram
def copy_sram_to_dram[thread_layout: Layout[thread_layout.shape_types, thread_layout.stride_types], *, swizzle: Optional[Swizzle] = None, num_threads: Int = thread_layout.size(), masked: Bool = False](dst: TileTensor[Engine=dst.Engine, linear_idx_type=dst.linear_idx_type], src: TileTensor[Engine=src.Engine, address_space=AddressSpace.SHARED, linear_idx_type=src.linear_idx_type], dst_num_valid_rows: OptionalReg[Int] = None)
Synchronously copies a tile from SRAM (shared memory) to DRAM (generic).
Delegates to SharedToGenericTileCopier. The binary_op fusion path of
the legacy free function is not supported here.
Parameters:
- thread_layout (
Layout[shape_types, stride_types]): Layout describing how threads are organized over the copy. - swizzle (
Optional[Swizzle]): Swizzle the shared-memory tile was populated with; must match the swizzle used when the tile was written. - num_threads (
Int): Total number of threads in the thread block. Threads beyondthread_layout.size()do not participate. - masked (
Bool): WhenTrue, vectors pastvalid_rows * row_strideare not stored, wherevalid_rowsisdst_num_valid_rowsor, when that isNone,dst.dim[0](). An FP32 source may be downcast to an FP16 or BF16 destination regardless ofmasked.
Args:
- dst (
TileTensor[Engine=dst.Engine, linear_idx_type=dst.linear_idx_type]): Destination tile in generic memory. - src (
TileTensor[Engine=src.Engine, address_space=AddressSpace.SHARED, linear_idx_type=src.linear_idx_type]): Source tile in shared memory. - dst_num_valid_rows (
OptionalReg[Int]): Explicit valid-row count for the masked bound; letsdstkeep a static shape (and thus the same thread distribution assrc) with a runtime row count.