[WS2][GEMM] Add Qwen3 FFN orchestration and consistency validation - #304
Open
bitborne wants to merge 1 commit into
Open
[WS2][GEMM] Add Qwen3 FFN orchestration and consistency validation#304bitborne wants to merge 1 commit into
bitborne wants to merge 1 commit into
Conversation
Signed-off-by: Schatten <czhengt@qq.com>
bitborne
requested review from
Flink-ddd,
KJLdefeated and
inaniloquentee
as code owners
August 13, 2026 05:37
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #239.
What changed
det_gemm+ CUDA SwiGLUdet_gemm+ Triton SwiGLU[4096, 6144][6144, 4096]Boundary
This PR only covers rank-local FFN arithmetic.
The module consumes the token tensor provided by the distributed wrapper and returns the local Down projection partial. It does not create process groups or run AllGather, AllReduce, or ReduceScatter.
The distributed TP/CP/SP PRs can wrap this module and apply the required communication outside it.
For backward, the local module produces
dX,dGate,dUp,dHidden, and the three local weight gradients. Cross-rank gradient reductions remain outside this PR.dWreduces over the token dimension, so this PR checks repeat determinism fordW, but does not claim bitwise equality after changing token or CP reduction partitions.Test plan
Static checks completed:
git diff --checkSM90 validation:
Build the CUDA extension with the deterministic SM90 GEMM path:
KERNEL_ALIGN_DET_GEMM_SM90=1 \ python -m pip install --no-build-isolation -e ".[dev]"Run the complete CUDA and Triton forward/backward, tolerance, real-shape, and batch-invariance tests:
Compare the CUDA consistent path with the PyTorch fast path using the TP=2 rank-local Qwen3-8B shape:
Compare the Triton consistent path with the same fast path and input data:
Optional unsharded Qwen3-8B experiment:
SM90 results
Pending SM90 run. The benchmark tables and JSON metadata will be added here before marking the PR ready for review.