Skip to main content

Mojo function

tile_layout_mn_major

tile_layout_mn_major[dtype: DType, mn_dim: Int, k_dim: Int, swizzle_mode: TensorMapSwizzle = TensorMapSwizzle.SWIZZLE_NONE]() -> Layout

Creates an MN-major layout for tensor core operations.

Constructs a unit layout optimized for MN-major access patterns in shared memory, with optional swizzling for improved memory access patterns.

Note: This returns the "unit" layout; the actual shared memory layout can be a multiple of this unit. Currently only supports SWIZZLE_NONE and SWIZZLE_128B modes.

Parameters:

  • ​dtype (DType): Element data type of the tensor.
  • ​mn_dim (Int): Size of the MN dimension.
  • ​k_dim (Int): Size of the K dimension.
  • ​swizzle_mode (TensorMapSwizzle): Memory access pattern swizzling mode (default: SWIZZLE_NONE).

Returns:

Layout: Layout - An MN-major layout configured for the specified dimensions and swizzle mode.

Was this page helpful?