Skip to content

[Perf] beam: Add the SM103 single-token BF16 MoE GEMV follow-up - #46401

Draft
Jiminator wants to merge 47 commits into
mainfrom
beam-sm103-moe-gemv
Draft

Jiminator wants to merge 47 commits into
mainfrom
beam-sm103-moe-gemv

Conversation

@Jiminator

@Jiminator Jiminator commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Move the opt-in SM103 single-token BF16 MoE GEMV out of #45254 so the Day-0 kernels can land independently. This draft keeps the GEMV, its shared SiLU helper and focused checks together. NVFP4 end-to-end validation does not exercise this BF16 path.

The operator uses Beam's TP4 expert shape (256 experts, hidden size 5120, intermediate size 640, top-k 8) and returns weighted per-expert BF16 outputs. The caller owns expert reduction, routed scaling and TP communication. Default model dispatch is unchanged here.

Validation:

  • The existing focused correctness run passed on GB300/SM103 (torch 2.14.1+cu130, Triton 3.8.0): 1 passed, 2 warnings in 1.24s. It checks an independent FP64 reference with BF16 rounding points, int32/int64 expert IDs, and five graph replays with changed inputs. The kernel, helper and test bytes match the tested source.
  • The standalone benchmark compares GEMV plus expert reduction with the existing Triton MoE using the same summed output. It warms both CUDA graphs, flushes L2 before timing and repeats ABBA ordering. Its GPU run and performance results are pending; there is no speedup claim yet.
  • Syntax, diff and pre-commit checks pass.

See the run instructions and focused correctness test.

Base: #45254 (beam-stack-02-kernels); retarget to main after that parent lands. The existing opt-in dispatch flag in #45256 needs coordination when the model stack is restacked. This draft does not depend on #45361.


CI States

Latest PR Test (Base): ❌ Run #40182158707
Latest PR Test (Extra): ❌ Run #40182158602
Latest PR Test (AMD ROCm 10): 🚫 Run #40182158433

Jiminator and others added 30 commits October 19, 2026 16:50
Add a Beam serving image on top of the v0.5.22 release image. It clones the upstream beam branch and adds the pins that branch needs, without changing docker/Dockerfile.

Split from #44747.
…ary (2/5)

Add the Beam fused projection/norm/residual and attention-gate ops, the FP32 router GEMV, BF16x3 and cuTile router GEMMs, the Beam all-reduce boundary kernel, and their kernel tests and benchmarks.

Split from #44747.

Co-authored-by: BBuf <1182563586@qq.com>
Co-authored-by: Caihua Li <caihua.li@bytedance.com>
Co-authored-by: Florent Gbelidji <florentgbelidji@Florents-MacBook-Pro.local>
Co-authored-by: iaroslav-reflection <iaroslav@reflection.ai>
Co-authored-by: Jinze Xue <jinzex@nvidia.com>
Co-authored-by: mloh <mloh@nvidia.com>
Co-authored-by: neilkg <33635204+neilkg@users.noreply.github.com>
Co-authored-by: thibautbar <t.barroyer@icloud.com>
Beam serving does not use Dynamo, and the v0.5.22 release already
resolves grpcio-tools 1.84.0. The pins move to their own PR so they
can be dropped without touching this layer.
The kernel, its test and its benchmark need the tileiras compiler.
They move with the router dispatch that uses them, so this layer
needs no new dependency.
The image is #45253 on its own; nothing in this PR uses it.
main has the merged #42930 version.
@github-actions github-actions Bot added documentation Improvements or additions to documentation jit-kernel labels Oct 25, 2026
@Jiminator
Jiminator force-pushed the beam-stack-02-kernels branch from 98141d2 to 851658f Compare October 25, 2026 09:48
@Jiminator
Jiminator force-pushed the beam-sm103-moe-gemv branch from 5808f6a to 15944d9 Compare October 25, 2026 09:48
Base automatically changed from beam-stack-02-kernels to main October 26, 2026 19:29

This branch has not been deployed

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

Labels

documentation Improvements or additions to documentation jit-kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant