vllm.models.inkling2.nvidia.ops.grouped_gemm
¶
BF16 grouped GEMM over expert-sorted rows (the expert LoRA projections).
Functions:
-
grouped_gemm–out[r] (+)= x[r] @ weight[e].Tfor this rank's expert-sorted rows.
grouped_gemm(x, weight, perm, offsets, num_rows, topk, gather, out=None)
¶
out[r] (+)= x[r] @ weight[e].T for this rank's expert-sorted rows.
Same row contract as ops.moe.expert_gemm: rows [offsets[0],
offsets[-1]) are this rank's, expert e's rows are [offsets[e],
offsets[e + 1]); with gather row r reads x[perm[r] // topk].
weight is BF16 [E, N, K]. Without out, returns a new
[num_rows, N] tensor whose rows outside this rank's range are
uninitialized; with out, adds into it (FP32 accumulation either way).