moe_unpermute_reduce_indexed

Function moe_unpermute_reduce_indexed 

Source
pub fn moe_unpermute_reduce_indexed(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    expert_output: DevicePtr,
    output: DevicePtr,
    token_to_perm: DevicePtr,
    topk_weights: DevicePtr,
    hidden_size: u32,
    num_tokens: u32,
    topk: u32,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: For each token, output[t] = sum_k topk_weights[t, k] * expert_output[token_to_perm[t, k]], one block per token.