moe_topk_softmax

Function moe_topk_softmax 

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

2026-09-25: Top-k experts of one token’s gate logits, with softmax weights, in one block. The kernel handle decides the logit type (moe_topk_softmax BF16, moe_topk_softmax_f32).