fp8_quant_grid

Function fp8_quant_grid 

Source
pub fn fp8_quant_grid(hopper: bool, m: u32, k: u32) -> [u32; 3]
Expand description

2026-09-25: Grid for one quantizer launch. Pure, so fp8_act_quant_tests.rs checks both arms without a GPU.

M is on grid X in both arms: X allows 2^31-1 blocks, Y only 65535.

Shared arm: (M, K/128, 1), one CTA per K-group; the kernel reads the group from blockIdx.y.

Hopper arm: (M, max(1, ceil(K/128 / 8)), 1). The kernel derives its group span as ceil(L / gridDim.y), so any Y in 1..=L covers every group exactly once; the Y extent is a speed choice.