moe_topk_softmax_batched

Function moe_topk_softmax_batched 

Source
pub fn moe_topk_softmax_batched(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    gate_logits: DevicePtr,
    expert_indices: DevicePtr,
    expert_weights: DevicePtr,
    num_experts: u32,
    top_k: u32,
    normalize: bool,
    num_tokens: u32,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: The top-k softmax router for num_tokens tokens. The handle picks the tie-break: moe_topk_softmax_batched keeps the lower lane on an equal logit, moe_topk_softmax_rows (2026-09-26) the lower expert index, as moe_topk_softmax does.