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 module

geometry

Kernel-geometry-derived scheduling constants.

The pipeline framework consumes four kernel-derived counts that live in two different configs today:

  • PipelineConfig.vm_per_load_a / vm_per_load_b β€” vmcnt entries consumed by one channel-A or channel-B prefetch (drives wait_vm derivation).
  • ScheduleConfig.lgkm_per_load_a / lgkm_per_load_b β€” lgkmcnt entries consumed by one channel-A or channel-B fragment load (drives wait_lgkm derivation).

Both are kernel-geometry properties β€” they fall out of BM/BN/BK, warp count, MMA shape, dtype size β€” but every kernel computes them from its own warp-grid + MMA-pattern assumptions. KernelGeometry captures the result once and exposes the derived counts as fields; each kernel layout (4-wave, ping-pong, ...) provides its own factory that does the layout-specific math and returns a KernelGeometry.

Existing kernels that pass the four values directly continue to work β€” this struct is purely additive consolidation of the API surface.

Structs​