Skip to content

cuda : the gate of the shared expert is its own launch in every MoE layer #95

Closed

Description

@rafasmour

A Qwen3.6 35B-A3B decode step is 976 kernel launches, about 24 per layer, and the gap between two launches costs as much as a small kernel. The MoE layer ends with: shared expert gate (a mul_mat with one weight row, ffn_gate_inp_shexp, [2048] F32), then sigmoid, mul, add, add. The last four already run as one kernel (sigmoid_gate_add), the mul_mat is its own launch for one output value.

To check: can the tail kernel compute that dot product itself, with the same result.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions