IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo function

get_micro_kernel_shape

def get_micro_kernel_shape[rank: Int, WO: Int, F: Int, conv_attr: ConvInfoStatic[rank], simd_size: Int]() -> IndexList[Int(2)]

Selects the (height, width) micro-kernel tile shape for the target.

When the output width, filter count, and convolution attributes are all statically known, the shape is tuned to minimize remainder work given the available SIMD register budget; otherwise a default per-target shape is returned.

Parameters:

  • ​rank (Int): Spatial rank of the convolution.
  • ​WO (Int): Static output width, or UNKNOWN_VALUE.
  • ​F (Int): Static filter count, or UNKNOWN_VALUE.
  • ​conv_attr (ConvInfoStatic[rank]): Static convolution attributes.
  • ​simd_size (Int): SIMD vector width for the target dtype.

Returns:

IndexList[Int(2)]: A two-element IndexList of (micro_kernel_height, micro_kernel_width).

Was this page helpful?