Repository navigation
Conversation
pggPL
force-pushed
the
ops_activations_compile
branch
from
October 9, 2026 11:01
3bc53ed to
7b65a95
Compare
Add activation forward/backward and fused bias-gradient custom ops with shared fake output descriptions. Cover quantized saved inputs, gated and dynamic activations, AMP, and MLP training with CUDA Graphs. Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
pggPL
force-pushed
the
ops_activations_compile
branch
from
October 20, 2026 16:09
6e34d17 to
3a60ea4
Compare
Use the same fake_activation implementation as LayerNormMLP, including optional separate quantization. Preserve the default fused activation path and incorporate current upstream changes. 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>
for more information, see https://pre-commit.ci
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
…to quantizer_gemm_ready_outputs Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com> # Conflicts: # transformer_engine/pytorch/csrc/common.h # transformer_engine/pytorch/csrc/extensions/cast.cpp # transformer_engine/pytorch/csrc/extensions/pybind.cpp # transformer_engine/pytorch/csrc/quantizer.cpp
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>
Add FUSED_NORM_QUANT_UNSWIZZLED to layernorm_fwd and handle compact scale views and swizzling in the existing Impl switches of both normalization functions instead of a separate optional path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
for more information, see https://pre-commit.ci
Convert a reused GEMM output with the quantizer where the output tensor is constructed instead of after the GEMM. Limit compact scale views and batched swizzling to the grouped NVFP4 split-quantize kernel; other multi-tensor paths swizzle per tensor in quantize(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Quantize NVFP4 outputs whose kernel cannot write GEMM-swizzled scales into compact scratch views and swizzle them with one kernel in multi_tensor_quantize and split_quantize, while outputs with in-kernel swizzling are written directly. Declare the internal swizzle helpers in util.h next to the existing ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
for more information, see https://pre-commit.ci
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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>
Use the merged optimize_for_gemm implementation while preserving activation custom ops and their fake metadata contracts. Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Reduce 137 cases to 73 while retaining each activation and representative layout, cache, autocast, dynamic-shape, quantization, and CUDA Graph coverage. Exercise cached FP8 input in fused GELU bias backward and aligned NVFP4 RHT output shapes. 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>
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
Enable full-graph compilation of
te.ops.SequentialMLPs containing ordinary activations, including SwiGLU, and the fused activation gradient and bias reduction used by quantized GELU/ReLU MLPs. Support NVFP4 forward/backward, optimizer steps and CUDA Graph replay with matching eager results.Targets
main, including merged upstream #3817, which honorsoptimize_for_gemmin quantized outputs. The feature diff adds activation compilation in five files.Type of change
Changes
dynamo.fake, using the quantizer layout guaranteed by main for forward and backward outputs. Preserve compute-dtype overrides for fused bias gradients.Validation
Earlier validation before the October 20 main merge: B100/SM100, PyTorch
2.15.0a0+875d815502.nvinternal.main, CUDA 13.4; existing October 7 native libraries reused, no fresh native build.attention/fused_mla_q_uproj.pyin the GPU container; no unrelated source cleanup is included. Pylint on the changed production file passed. Removing the unused normalization helper leaves activation implementations unchanged.November 12 update: merged upstream
mainatbb3be523after NVIDIA#3817 landed and returned the PR base tomain. Kept the merged native implementation and preserved the five-file activation feature diff, including compute-dtype overrides and the plain-gradient alias branch infake_bgrad. Syntax, pre-commit and source-preservation checks passed. Runtime tests remain paused and were not rerun. CPU offload, delayed scaling, additional activation variants, collectives and extra tensor channels remain follow-ups.Checklist:
Draft pending author review.