[JAX] Return max_logit from TE fused attn - #3112
Open
KshitijLakhani wants to merge 16 commits into
Open
Conversation
KshitijLakhani
force-pushed
the
klakhani/feat/return-softmax-stats
branch
2 times, most recently
from
July 8, 2026 23:28
4f3fbb3 to
9a56117
Compare
KshitijLakhani
force-pushed
the
klakhani/feat/return-softmax-stats
branch
2 times, most recently
from
July 27, 2026 00:57
ca8551c to
fc151f9
Compare
…x aux to the user from TE JAX fused attn output Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
… and softmax through the JAX fused attn primitives Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
…JAX fused attn tests Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
for more information, see https://pre-commit.ci
… function for it Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
KshitijLakhani
force-pushed
the
klakhani/feat/return-softmax-stats
branch
from
August 21, 2026 06:18
fc151f9 to
5dba98d
Compare
Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
KshitijLakhani
force-pushed
the
klakhani/feat/return-softmax-stats
branch
from
August 21, 2026 06:49
fd2fff3 to
f31d5de
Compare
KshitijLakhani
marked this pull request as ready for review
August 21, 2026 06:49
Contributor
Greptile SummaryThe PR adds an opt-in JAX fused-attention auxiliary result containing the global per-head maximum logit.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains in the eligible follow-up review scope. No blocking failure remains. Important Files Changed
Sequence DiagramsequenceDiagram
participant User as JAX/Flax caller
participant API as fused_attn
participant Primitive as JAX fused-attention primitive
participant FFI as C++/cuDNN FFI
User->>API: "return_max_logit=True"
API->>Primitive: attention inputs and configuration
Primitive->>FFI: fused-attention forward
FFI-->>Primitive: output, softmax aux, raw Max, RNG state
Primitive->>Primitive: reduce raw Max to global per-head maximum
Primitive-->>API: output and max_logit
API-->>User: "(output, {max_logit})"
Reviews (3): Last reviewed commit: "[pre-commit.ci] auto fixes from pre-comm..." | Re-trigger Greptile |
Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com>
KshitijLakhani
force-pushed
the
klakhani/feat/return-softmax-stats
branch
from
August 21, 2026 07:45
cc33228 to
8dabb52
Compare
for more information, see https://pre-commit.ci
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
Return the max_logit from TE JAX fused attn to maintain parity with TE PyT fused attn.
Returning the softmax aux stats is a separate request and a bit mroe involved, so it'll be addressed separately.
Exposing the max_logit gives sufficient telemetry insight to users, for starters.
Fixes #2945
Test time added for non CP is <1 min and for CP <3 mins
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: