flashinfer.fused_moe.get_scratchpad_size_bytes

flashinfer.fused_moe.get_scratchpad_size_bytes() int

Return the global scratchpad size (bytes) required by the kernel.

Sourced from the C++ sizeof(MoEGemmSpec<Dims>) (exported as monomoe_scratchpad_size) so the buffer can never desync from the kernel’s struct layout — the software-grid-barrier counters live at the tail of that struct and must be backed by allocated memory.