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

Batched top-K softmax: N tokens in parallel.

Grid: (num_tokens, 1, 1) Block: (256, 1, 1)