moe_expert_silu_down_shared_bf16_batch2

Function moe_expert_silu_down_shared_bf16_batch2 

Source
pub fn moe_expert_silu_down_shared_bf16_batch2(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    gate_out: DevicePtr,
    up_out: DevicePtr,
    down_weight_ptrs: DevicePtr,
    output: DevicePtr,
    expert_indices: DevicePtr,
    sh_gate_in: DevicePtr,
    sh_up_in: DevicePtr,
    sh_down_weight: DevicePtr,
    sh_down_out: DevicePtr,
    n: u32,
    k: u32,
    top_k: u32,
    stream: u64,
) -> Result<()>
Expand description

Fused SiLU+down expert GEMV with shared expert for BF16 weights — K=2 batch.

BF16 K=2 variant of moe_expert_silu_down_shared_fp8_batch2.

Grid: (ceil(N/8), 2top_k+1, 1) Block: (128, 1, 1) y in [0,2top_k) = routed (per token); y==2*top_k = shared (both tokens).