Skip to content

perf(cuda): batched-trunk prefill for the pure-attention layer-split hybrid (CudaHybridForwardPass / Qwen3-Coder-30B) #123

Description

@pekkah

Follow-up to #119 (PR #120). #119 extended the batched-prefill trunk to the dense and GPU-SLRU configs of CudaHybridGdnForwardPass (the all-GPU-trunk GDN-hybrid class). But Qwen3-Coder-30B-A3B — named in #119 — is a pure-attention MoE (no GDN layers) routed through a different class, CudaHybridForwardPass (the -g N layer-split hybrid: N attention layers + MoE on GPU, the rest on CPU). That class has no batched-prefill path at all — it prefills token-by-token via its own Forward.

So the Coder-30B CUDA row (and any other model on CudaHybridForwardPass) still pays per-token prefill: per-position attention launches + per-token MoE.

Scope

Tests

  • BatchedPrefill_BitwiseMatchesSequential for a CudaHybridForwardPass model (Qwen3-Coder-30B-A3B CUDA, -g -1), single + multi-chunk + >4096.

Related / out of scope

  • Vulkan and CPU-only GDN-hybrid backends still prefill per-token (no batched kernels) — would need their own batched implementations; track separately if wanted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions