Skip to main content

Mojo struct

IteratorScatterGatherAmd

struct IteratorScatterGatherAmd[thread_layout: Layout, num_threads: Int = thread_layout.size(), thread_scope: ThreadScope = ThreadScope(0), block_dim_count: Int = 1]

Iterator-based AMD data movement delegate for scatter-gather operations.

This struct provides an iterator-based approach for data movement between DRAM and registers on AMD GPUs.

Parameters

  • thread_layout (Layout): The layout defining thread organization.
  • num_threads (Int): Total number of threads (defaults to thread_layout size).
  • thread_scope (ThreadScope): The scope of thread execution (block or warp).
  • block_dim_count (Int): Number of block dimensions.

Fields

  • buffer (AMDBufferResource):

Implemented traits

AnyType, UnknownDestructibility

Aliases

__del__is_trivial

alias __del__is_trivial = True

Methods

__init__

__init__(out self, tensor: LayoutTensor[dtype, layout, origin, address_space=address_space, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], tensor_iter: LayoutTensorIter[dtype, layout, origin, address_space=address_space, alignment=alignment, circular=circular, axis=axis, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked])

Initialize the iterator-based scatter-gather delegate.

Args:

  • tensor (LayoutTensor): The layout tensor for bounds information.
  • tensor_iter (LayoutTensorIter): The layout tensor iterator for creating the AMD buffer resource.

copy

copy(self, dst_reg_tile: LayoutTensor[dtype, layout, origin, address_space=address_space, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], src_gmem_tile_iter: LayoutTensorIter[dtype, layout, origin, address_space=address_space, alignment=alignment, circular=circular, axis=axis, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked])

Copy data from DRAM to registers using an iterator.

Args:

Was this page helpful?