Repository navigation
Conversation
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Reuse the upstream SiTU activation string and ActivationParams container. Keep eligible cuDNN fusion and use masked JAX activation operations with a VJP for unfused execution. Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Define SiTU gate and up operations in the existing parameter-aware activation converter. Use one masked gated-activation helper and VJP for SiTU and SwiGLU, and move fallback documentation from the API index to the moe parameters. Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Remove _apply_ffn_activation and call the existing JAX activation and VJP routines. Keep receive-capacity masking at the MoE call sites and exercise the actual forward/backward composition. Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
…FN fallback tests Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
pggPL
marked this pull request as ready for review
November 24, 2026 20:40
Contributor
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryAdds a JAX SiTU-GLU fallback between the existing grouped GEMMs.
No actionable issues were found. No runtime tests were run during this review. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[MoE call] --> B{cuDNN fusion eligible?}
B -->|Yes| C[Fused grouped GEMM and SiTU]
B -->|No| D[Grouped FC1 GEMM]
D --> E[Mask unused rows]
E --> F[FP32 JAX SiTU]
F --> G[Cast to projection dtype]
G --> H[Separate grouped quantization]
C --> I[Grouped FC2 GEMM]
H --> I
I --> J[Combine expert outputs]
Reviews (1) · Last reviewed commit: "[JAX] Simplify SiTU fallback unit tests" · Reviewed by Greptile |
This branch has not been deployed
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.
Description
Follow-up to NVIDIA/TransformerEngine#3873, now merged into
main. Add a pure JAX SiTU-GLU fallback to MoEBlock for BF16 and configurations where the cuDNN Frontend fusions do not apply. No group-aware activation kernels are added.Eligible MXFP8 configurations continue using cuDNN SiTU-GLU/dGLU fusion. With
use_cudnn_fusion=False, or when fusion is unavailable, evaluate both soft caps in FP32 using JAX between the existing grouped GEMMs and compute both branch gradients withjax.vjp. Device expert counts mask inactive values and gradients, including NaN-filled receive-buffer tails. Activation output keeps the projection dtype, and fallback MXFP8 quantization remains separate. Ineligible fusion requests warn and fall back using the existing MoE policy.Validation below applies to the preceding head
2a9e329. After updating to main (a6393d0), validated 59 focused cases on RTX 5880 Ada, using the actual shared parameter and tensor classes, existing activation/VJP routines and complete per-shard forward/backward source. This includes existing default/custom parameter-forwarding tests with mocked cuDNN, fusion selection for SM89/100/103/107, FP32/FP16/BF16 activation and gradient checks, inactive/empty capacity, dynamic counts, vmap/rematerialization, and forward/backward composition with early/late routing weights, biases and SwiGLU controls. Native grouped GEMM/quantization are JAX test doubles in the backward harness; this is not a full TE/EP or fused-cuDNN GPU integration result. Also passed 48 existing adapter compatibility cases on CPU, full JAX/common Python lint (10.00/10), pre-commit, source license and diff checks. Distributed SiTU cases are prepared in the existing MoE suite; full Blackwell/NCCL/EP and Kimi-K3 training were not rerun. The latest FP32 GLU forward/recomputation update (7cacedb5) has passed Python syntax, static precision-path and git diff checks only. Its GPU/pre-commit rerun is pending: workstation access currently times out.Type of change
Changes
_jax_act_lu/_jax_quantize_dact_dbiasin MoE, with capacity masking at the call sites.ActivationParamsplumbing introduced in NVIDIA/TransformerEngine#3873.Checklist: