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
mhc_pre_launch_config
def mhc_pre_launch_config(num_rows: Int, hidden_size: Int, force_k_splits: Int = Int(0)) -> Tuple[Int, Int, Int]
Returns how mhc_pre launches for T tokens at hc_mult = 4.
Args:
- โnum_rows (
Int): Number of tokensT. - โhidden_size (
Int): Width of one stream. - โforce_k_splits (
Int): K-splits to use; 0 picks.
Returns:
Tuple[Int, Int, Int]: (MB, KS, num_launches): MB = ceil(T / 16) token blocks, KS
slices of K per block, and 1 launch when KS == 1 (the fused
kernel), 2 otherwise (partials, then finish), 0 when T == 0.
Raises:
If force_k_splits is not 0 or a power of two that divides
4 * hidden_size / 64, at most 256.