Transformer Engine v2.21 Release Notes#
Key Features and Enhancements#
[PyTorch] Added experimental cuDNN-backed
KimiDeltaAttention. (#3548)[Common, PyTorch] Added prototype NVFP4 quantization with UE5M3 block scales. (#3325)
[PyTorch] Expanded
torch.compile(fullgraph=True)support to FP16 and BF16 FusedAttention, fusibleBasicLinearandBiasoperations including Linear + Bias forward fusion, and FP8 weight caching in compiledLinearcalls usingis_first_microbatch. (#3472) (#3547) (#3505)[PyTorch] Added FlashAttention 3 and FlashAttention 4 support for THD attention with
pad_between_seqs=True, including P2P and all-to-all context parallelism. (#3205)[PyTorch] Added support for FlashAttention 2.8.4. (#3403)
[PyTorch] Added support for backward with head dimension 256 in THD and context parallel attention when using FlashAttention 4.0.0b33+ (#3540)
[PyTorch] Improved THD training performance with dropout on SM100 and SM103. (#3313)
[PyTorch] Added
MoeDispatchandMoeCombinefusible operations for building MoE blocks withte.ops.Sequentialand improved the performance of it. (#3503)[Common, PyTorch] Added a deterministic mode to
fused_moe_aux_lossthroughdeterministic=True. (#3587)[PyTorch] Extended the fused grouped MLP with deterministic
dprobfor GLU activations and fused activation recompute forScaledTanhSReLU. (#3635) (#3473) (#3666)[Common, PyTorch] Added
fused_mla_kv_rope_mxfp8, which fuses multi-latent attention key/value RoPE with MXFP8 quantization for DeepSeek-V3 head dimensions on SM100 and later. (#3672)[Common, PyTorch] Added a fused RMSNorm forward kernel with MXFP8 output that writes compact or GEMM-swizzled scaling factors directly. (#3657)
[Common] Improved low-precision quantization performance with 128x128-tile grouped MXFP8 requantization, one-CTA-per-tile MXFP8 scale swizzling, and single-pass row and column amax for single and grouped row-scaled NVFP4. (#3656) (#3658) (#3454) (#3467)
[Common, PyTorch] Added NVFP4 Random Hadamard Transform support on SM120 and SM121 GPUs. (#3300)
[Common, PyTorch] Added
return_argmax=Truetoparallel_cross_entropy, returning the predicted token index without a second pass over the logits. (#3671)[PyTorch] Added
zero_tensor_dummy_wgrad, which returns a storage-free dummy weight gradient for parameters usingfuse_wgrad_accumulation, avoiding redundant additions when a weight is used more than once. (#3670)[Common, PyTorch] Reduced CPU overhead in
Linear,LayerNormLinear,LayerNormMLP, andGroupedLinearby removing unnecessary tensor views and a redundant device-to-host split-size synchronization. (#3523) (#3554)[JAX] Optimized the MoE block with fused cuDNN Frontend MXFP8 grouped GEMM and activation kernels, quantization before FSDP all-gather, and user-controlled checkpoint names on block intermediates. (#3638) (#3589)
[Build] Reduced source-build time by compiling NVFP4 quantization kernels with NVRTC. (#3301)
[Build] Made aarch64 Transformer Engine libraries compatible with BOLT post-link optimization. (#3383) (#3627)
[Docs] Added a datatype and hardware support matrix and a Mixture of Experts guide with PyTorch and JAX examples. (#3195) (#3494)
[JAX] Added an opt-in fused Expert Parallelism prepare-and-dispatch path through
NVTE_EP_FUSED_PREPARE_DISPATCH=1. (#3674)
Fixed Issues#
[Common] Fixed shared-memory reuse races and incomplete TMA store synchronization in FP8, MXFP8, NVFP4, and Hadamard-fusion quantization kernels. (#3417)
[Common] Fixed incorrect column-wise scales in grouped MXFP8 quantization with varying last dimensions and GEMM-swizzled scales. (#3599)
[Common] Fixed kernel launch failures on GPUs with smaller per-block shared-memory or register limits by falling back from gated-activation TMA kernels and bounding multi-tensor swizzle kernel registers. (#3600) (#3622)
[Common] Fixed silent out-of-bounds bias reads in non-FP8 GEMMs by rejecting bias tensors whose dtype differs from the output dtype. (#3565)
[Common] Fixed integer overflow in fused MoE auxiliary-loss kernels for inputs larger than
INT_MAXelements. (#3569)[Common] Fixed loss of small sigmoid scores in biased fused top-k routing. (#3637)
[Common, PyTorch] Fixed THD context-parallel kernel launch failures with large packed-document counts by keeping sequence-boundary tables within shared-memory limits. (#3698)
[Common] Fixed segmentation faults at process exit after NVRTC kernels or CUDA graph-captured cuDNN fused attention were used. (#3733)
[Common] Disabled FusedAttention for THD training with learnable softmax on cuDNN versions earlier than 9.26 to avoid incorrect
dSinkresults and out-of-bounds reads. (#3470)[Common] Fixed
Float8CurrentScalingandFloat8BlockScalingignoring theuse_power_2_scalesanduse_f32_scalesconstructor arguments. (#3605)[Build, Common] Fixed source builds for Blackwell targets with CUDA 12.8. (#3602)
[PyTorch] Fixed attention backend selection so a broken FlashAttention 2 or 3 installation no longer breaks
import transformer_engine.pytorch, and FlashAttention 4 is skipped for deterministic backward on SM12x. (#3553) (#3595)[PyTorch] Made FlashAttention 4 backward on Hopper fail with an actionable error instead of hanging when
quack-kernels0.6.0 through 0.6.3 is installed with CUTLASS DSL 4.6.2 or later. (#3762)[PyTorch] Fixed NVFP4
torch.compilefailures for non-matrixLinearinputs and incorrect gradients from compiled Linear operations with bias. (#3628)[PyTorch] Fixed ONNX export of MXFP8 block quantization for TensorRT 11.4, FP8 current-scaling quantization output metadata, and the registered
layernormoperator. (#3592) (#3659)[PyTorch] Fixed deferred initialization of fusible operations by adding
reset_parameters()tote.ops.Linear,te.ops.Bias, andte.ops.Sequential. (#3327)[PyTorch] Fixed
GroupedLineardistributed weights on the grouped-tensor path, including backwardmain_gradhandling and FP8 requantization of re-gathered weights. (#3517)[PyTorch] Fixed NVFP4 weight views in the single-group fused grouped MLP. (#3662)
[PyTorch] Fixed
GroupedTensorgradient propagation through autograd views and stream tracking of its backing tensors. (#3701)[PyTorch] Fixed
LayerNormLinearsilently disabling Userbuffers all-gather overlap when the forward pass runs undertorch.no_grad(). (#3546)[PyTorch] Fixed
FusedSGD.zero_grad(set_to_none=False)setting gradients toNoneinstead of zeroing them. (#3549)[PyTorch] Fixed NCCL-EP bootstrap and Newton-Schulz with PyTorch’s
ProcessGroupNCCL2backend by borrowing the NCCL communicator in C++. (#3586)[JAX] Fixed intermittent distributed softmax hangs by initializing softmax custom calls before execution. (#3612)
[JAX] Avoided CUDA graph stream-capture failures by disabling the experimental CuTeDSL backend in JAX. (#3784)
[Common, JAX] Fixed Expert Parallelism handles when XLA relocates handle memory, such as under
lax.scan, by reconstructing handles withncclEpImportHandleand defaultingtopk_idxto int32. (#3639)[Build, JAX] Added the missing Triton dependency to the JAX extension. (#3610)
Breaking Changes in This Release#
[Build, Common] Builds with the experimental
NVTE_WITH_CUTEDSL=1option now requirenvidia-cutlass-dsl4.8.0 or later. (#3620)
Deprecated Features#
[PyTorch] Deprecated
NVTE_CUTEDSL_FUSED_GROUPED_MLPin favor of passingsplit_alignment=256tote.ops.GroupedLinear; single grouped weights and biases no longer requireNVTE_GROUPED_LINEAR_SINGLE_PARAM. (#3584)[Common, JAX, PyTorch] Removed the PyTorch Expert Parallelism handle cache that could exhaust its 4096-handle limit and deprecated the handle cache,
NVTE_EP_HANDLE_CACHE_SIZE, and the non-v2nvte_ep_dispatch,nvte_ep_combine,nvte_ep_dispatch_bwd, andnvte_ep_combine_bwdAPIs for removal in Transformer Engine 3.0. (#3760)[JAX] Added an opt-in fused Expert Parallelism prepare-and-dispatch path through
NVTE_EP_FUSED_PREPARE_DISPATCH=1and deprecatedep_prepareandep_dispatch_fwdin favor ofep_prepare_and_dispatch_fwd, with removal planned in Transformer Engine 3.0. (#3674)[Common, PyTorch] Removed device-side validation of Quantile Balancing bin bounds and deprecated the now-redundant
mark_qb_bin_bounds_validatedand unvalidated QB C API variants. (#3734)