For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
output_reg_to_smem_st_matrix
def output_reg_to_smem_st_matrix[output_type: DType, accum_type: DType, num_m_mmas: Int, padded_depth: Int, o_frag_size: Int, //, BM: Int, swizzle: Swizzle, num_consumer: Int](warp_group_thread_idx: UInt32, local_warp_group_idx: UInt32, output_reg_tile: TileTensor[accum_type, Layout[*?, *?], MutAnyOrigin, address_space=AddressSpace.LOCAL], accum_smem_tile: TileTensor[output_type, Layout[*?, *?], MutAnyOrigin, address_space=AddressSpace.SHARED])
Stores output register fragments to shared memory using the stmatrix PTX instruction.
Parameters:
- βoutput_type (
DType): Element type of the values stored to shared memory (inferred). Must bebf16orf16. - βaccum_type (
DType): Element type of the accumulator fragments held in registers (inferred). - βnum_m_mmas (
Int): Number of MMA operations along the M dimension (inferred). - βpadded_depth (
Int): Head dimension padded to the tensor-core alignment boundary, in elements (inferred). - βo_frag_size (
Int): Number of elements per output fragment produced by each MMA (inferred). - βBM (
Int): Tile block size in the row dimension, in elements. - βswizzle (
Swizzle): Swizzle layout mappingstmatrixcoordinates to shared memory offsets. - βnum_consumer (
Int): Number of consumer warp groups participating in the store.
Args:
- βwarp_group_thread_idx (
UInt32): Thread index within the warp group. - βlocal_warp_group_idx (
UInt32): Local index of this warp group among the consumer warp groups. - βoutput_reg_tile (
TileTensor[accum_type, Layout[*?, *?], MutAnyOrigin, address_space=AddressSpace.LOCAL]): Register tile holding the output fragments to store. - βaccum_smem_tile (
TileTensor[output_type, Layout[*?, *?], MutAnyOrigin, address_space=AddressSpace.SHARED]): Shared-memory tile receiving the stored output.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!