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 function

make_ldmatrix_swizzle

def make_ldmatrix_swizzle[dtype: DType, row_size: Int, log2_vector_width: Int = Int(0)]() -> Swizzle

Make swizzle to avoid bank conflict for ldmatrix ops.

Creates a swizzle pattern optimized for ldmatrix operations. Minimizes bank conflicts in shared memory for these operations. Calculates swizzle parameters based on data type and row size.

Parameters:

  • โ€‹dtype (DType): The data type of the elements.
  • โ€‹row_size (Int): Size of each row in elements.
  • โ€‹log2_vector_width (Int): Log2 of the vector width (default: 0).

Returns:

Swizzle: A Swizzle object configured for ldmatrix.

Was this page helpful?