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

router_gate_use_mixed_gemv

def router_gate_use_mixed_gemv(m: Int) -> Bool

Returns whether runtime m should take the fused mixed router GEMV.

Only tiny-M (decode) rows use the single-launch mixed GEMV. m == 0 (graph-capture warmup) takes neither path, and large m (prefill) must fall back to cast + fp32 matmul to preserve the baseline's performance.

Args:

  • m (Int): The runtime row count of the router-gate activation.

Returns:

Bool: True if the fused mixed GEMV should be launched for this m.

Was this page helpful?