build_moe_row_adapter_host

Function build_moe_row_adapter_host 

Source
pub fn build_moe_row_adapter_host(
    cu_seqlens_host: &[i32],
    adapter_slots: &[i32],
) -> Option<Vec<i32>>
Expand description

2026-09-25: The [total_tokens] per-row adapter map of a packed prefill batch. cu_seqlens_host is the [batch + 1] prefix sum of per-stream token counts; stream b’s adapter_slots[b] is written, unchanged, over rows cu_seqlens_host[b]..cu_seqlens_host[b + 1]. Only tests call it today.

None, before any row is written, when cu_seqlens_host has fewer than two entries, adapter_slots is not batch long, the first entry is not 0, or any boundary is negative or decreasing.