IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

make_ldmatrix_swizzle

make_ldmatrix_swizzle[dtype: DType, row_size: Int, log2_vector_width: 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.