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

Mojo function

ws_p_ceiling

def ws_p_ceiling[sm_count: Int](raw_grid: UInt32) -> UInt32

Capture-invariant partition-count ceiling for the split-K crossover: follows one GPC wave's SM-fill, holds the plateau through WS_SWEEP_MAX_RAW_GRID, then decays toward one partition.

raw_grid is capture-invariant (see _bucket_ws), so this is a single fixed value per CUDA-graph capture.

WS_RAW_GRID_CLAMP clamps raw_grid instead of multiplying the wave-fill: a flat multiple reproduces the moderate-batch optimum but also scales the already-good small-raw_grid case into a measured regression, so clamping leaves small grids untouched while lifting a small one-wave toward the plateau. Beyond the sweep, the inverse target keeps the split grid near a fixed wave budget rather than growing with raw_grid.

Returns:

UInt32

Was this page helpful?