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 struct

TMEMToSMemWriter

struct TMEMToSMemWriter[c_type: DType, accum_type: DType, c_smem_dim0: Int, c_smem_dim1: Int, epc: EpilogueConfig, num_output_warps: Int, c_swizzle: TensorMapSwizzle = TensorMapSwizzle.SWIZZLE_128B]

Write TMEM accumulators to SMEM via st.matrix (SM100-specific).

Fields

  • warp_id (UInt32):
  • lane_id (UInt32):

Implemented traits

AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable

comptime members

BM

comptime BM = epc.BM

c_smem_layout

comptime c_smem_layout = Layout.row_major(c_smem_dim0, c_smem_dim1)

Config

comptime Config = epc

cta_group

comptime cta_group = epc.cta_group

data_paths

comptime data_paths = 16

stage_contiguous_size

comptime stage_contiguous_size = c_smem_dim1

stageN

comptime stageN = epc.stageN

swizzle

comptime swizzle = make_swizzle[c_type, c_swizzle]()

swizzle_width

comptime swizzle_width = (c_swizzle.bytes() // size_of[c_type]())

transpose_c

comptime transpose_c = epc.transpose_c

Methods

__init__

def __init__(warp_id: UInt32, lane_id: UInt32) -> Self

write_fragments

def write_fragments[repeat: Int](self, upper_frag: Array[Scalar[c_type], (epc * repeat)], lower_frag: Array[Scalar[c_type], (epc * repeat)], c_smem_tile: TileTensor[address_space=AddressSpace.SHARED, linear_idx_type=c_smem_tile.linear_idx_type])

Write pre-loaded fragments to SMEM.