Skip to main content

Mojo struct

SMemTile

struct SMemTile[dtype: DType, layout: Layout, alignment: Int]

Helper struct for allocating shared memory tiles.

Parameters

  • dtype (DType): Data type of the tile elements.
  • layout (Layout): Layout configuration for the tile.
  • alignment (Int): Memory alignment requirement.

Implemented traits

AnyType, UnknownDestructibility

Aliases

__del__is_trivial

alias __del__is_trivial = True

storage_size

alias storage_size = (layout.size() * size_of[dtype]())

T

alias T = LayoutTensor[dtype, layout, MutableAnyOrigin, address_space=AddressSpace(3), alignment=alignment]

Methods

build

static build(mut smem_mgr: NVIDIASharedMemoryManager[name, alignment, memory_alignment]) -> LayoutTensor[dtype, layout, MutableAnyOrigin, address_space=AddressSpace(3), alignment=alignment]

Build a shared memory tile using the memory manager.

Args:

Returns:

LayoutTensor: The allocated shared memory tile.

Was this page helpful?