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

copy_dram_to_sram

def copy_dram_to_sram[thread_layout: Layout[thread_layout.shape_types, thread_layout.stride_types], *, swizzle: Optional[Swizzle] = None, num_threads: Int = thread_layout.size(), thread_scope: ThreadScope = ThreadScope.BLOCK, element_size: Int](dst: TileTensor[Storage=dst.Storage, address_space=AddressSpace.SHARED, linear_idx_type=dst.linear_idx_type, element_size=element_size], src: TileTensor[Storage=src.Storage, linear_idx_type=src.linear_idx_type, element_size=element_size])

Synchronously copies a tile from DRAM (generic memory) to SRAM (shared).

Delegates to GenericToSharedTileCopier.

Parameters:

  • thread_layout (Layout[thread_layout.shape_types, thread_layout.stride_types]): Layout describing how threads are organized over the copy.
  • swizzle (Optional[Swizzle]): Optional swizzle applied to the shared-memory destination for bank-conflict mitigation. None produces a straight copy.
  • num_threads (Int): Total number of threads in the thread block. Threads beyond thread_layout.size() do not participate.
  • thread_scope (ThreadScope): Scope at which thread operations are performed.
  • element_size (Int): Number of scalar elements per logical element; inferred from the source and destination tiles.

Args: