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 struct

KernelGeometry

struct KernelGeometry

Bundles kernel-shape inputs and the derived scheduling counts.

Fields: BM, BN, BK: Block shape (M-tile, N-tile, K-tile per workgroup). MMA_M, MMA_N, MMA_K: MFMA op shape. elem_bytes: Element size in bytes (1 for FP8, 2 for BF16/FP16, 4 for FP32). simd_width: SIMD load width in elements (typically simd_width_of[in_type]()). is_fp8: True iff elem_bytes == 1. vm_per_load_a, vm_per_load_b: vmcnt entries per A/B prefetch. lgkm_per_load_a, lgkm_per_load_b: lgkmcnt entries per A/B frag-load.

Fields​

  • ​BM (Int): Block shape M (rows per workgroup tile).
  • ​BN (Int): Block shape N (columns per workgroup tile).
  • ​BK (Int): Block shape K (reduction dimension per workgroup tile).
  • ​MMA_M (Int): MFMA op shape M.
  • ​MMA_N (Int): MFMA op shape N.
  • ​MMA_K (Int): MFMA op shape K.
  • ​elem_bytes (Int): Element size in bytes (1 for FP8, 2 for BF16/FP16, 4 for FP32).
  • ​simd_width (Int): SIMD load width in elements (typically simd_width_of[in_type]()).
  • ​is_fp8 (Bool): True iff elem_bytes == 1 (FP8 dtypes).
  • ​vm_per_load_a (Int): Number of vmcnt entries consumed per channel-A prefetch.
  • ​vm_per_load_b (Int): Number of vmcnt entries consumed per channel-B prefetch.
  • ​lgkm_per_load_a (Int): Number of lgkmcnt entries consumed per channel-A fragment load.
  • ​lgkm_per_load_b (Int): Number of lgkmcnt entries consumed per channel-B fragment load.

Implemented traits​

AnyType, Copyable, ImplicitlyDestructible, Movable