fix: Float32RMSNorm torch.compile crash on PyTorch 2.11+#1650
Merged
Conversation
Contributor
Author
|
/claude review |
Contributor
Author
|
/ok to test 3f567d4 |
Contributor
There was a problem hiding this comment.
Clean refactor — extracting the forward into a standalone compiled function to reduce dynamo guards makes sense.
One concern flagged inline: the module-level configure_torch_dynamo(cache_size_limit=64) sets a limit lower than the existing default of 256 used by CompileConfig. This is only effective when full model compile is disabled (otherwise apply_torch_compile overrides it). The comment says "bump" which is misleading — worth clarifying the intent or aligning the values.
Contributor
Author
|
/claude review |
Contributor
Author
|
/ok to test 3406485 |
Contributor
Author
|
/claude review |
Contributor
Author
|
/ok to test b18eaae |
Fixes L0_Unit_Tests_CPU failure introduced by 980f23d on main. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: hemildesai <hemild@nvidia.com>
Contributor
Author
|
/claude review |
Contributor
Author
|
/ok to test a2f4ee8 |
akoumpa
approved these changes
Apr 2, 2026
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.
Summary
Float32RMSNorm.forwardinto a standalone_float32_rms_norm_fwd()compiled function to reduce dynamo guard-state combinations (eliminates guards onselfand module state)cache_size_limitto 64 unconditionally incompile_utils.pyso per-method@torch.compiledecorators don't hitFailOnRecompileLimitHitfrom varying ndim/autocast/grad_mode combinationsTest plan
rms_norm: torch_fp32on PyTorch 2.11 (torch 2.11.0a0+eb65b36914.nv26.02) without crash🤖 Generated with Claude Code