Mojo function
tile_layout_mn_major
tile_layout_mn_major[type: DType, mn_dim: Int, k_dim: Int, swizzle_mode: TensorMapSwizzle = TensorMapSwizzle(__init__[__mlir_type.!pop.int_literal](0))]() -> 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:
- type (
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
- An MN-major layout configured for the specified dimensions and swizzle mode.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!