Mojo function
copy_sf_tmem
copy_sf_tmem[sf_dtype: DType, sf_smem_layout: Layout, TILE_MN: Int, cta_group: Int](sf_smem: LayoutTensor[dtype, layout, origin, address_space=AddressSpace.SHARED, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], sf_tmem: TmemTensor[dtype, layout, cta_group=cta_group])
Copy scaling factors from shared memory to tensor memory.
This is required before MMA operations that use block scaling. The scaling factors must be in TMEM for the MMA instruction to access them.
Parameters:
- sf_dtype (
DType): Scaling factor data type. - sf_smem_layout (
Layout): Layout of scaling factors in SMEM. - TILE_MN (
Int): M or N dimension of the tile (BM for A, MMA_N for B). - cta_group (
Int): CTA group size.
Args:
- sf_smem (
LayoutTensor): Source SMEM tensor containing scaling factors. - sf_tmem (
TmemTensor): Destination TMEM tensor for scaling factors.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!