PyTorch 2.12 compatibility#1648
Merged
Merged
Conversation
Collaborator
Author
|
/blossom-ci |
- Updated internal weight initialization in distributed AFNO layers and EarthAttention blocks to utilize `torch.nn.init.trunc_normal_` instead of legacy implementations. - Deprecated `trunc_normal_` wrapper in `physicsnemo.nn.module.utils` and removed the in-tree legacy implementation. - Regenerated forward-accuracy reference outputs for several models to align with the new initialization method. - Updated tests to skip on PyTorch versions below 2.12 due to changes in RNG algorithms affecting output consistency.
Contributor
Greptile SummaryThis PR updates PhysicsNeMo for PyTorch 2.12 compatibility by replacing frozen in-tree
Important Files Changed
Reviews (1): Last reviewed commit: "Refactor weight initialization to use Py..." | Re-trigger Greptile |
ktangsali
approved these changes
May 19, 2026
Collaborator
ktangsali
left a comment
There was a problem hiding this comment.
Changes to afno path look good. Thanks @peterdsharpe
Collaborator
Author
|
/blossom-ci |
5 similar comments
Collaborator
|
/blossom-ci |
Collaborator
|
/blossom-ci |
Collaborator
|
/blossom-ci |
Collaborator
|
/blossom-ci |
Collaborator
|
/blossom-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.
PhysicsNeMo Pull Request
Description
Hey folks! Noticed on a sibling PR (#1633) that some tests are failing with the recently-released PyTorch 2.12. Thought I'd start a branch on the main repo that we (maintainers) can collaborate on to iron out the minor CI issues.
This PR currently has just one commit, which is the result of
uv sync --upgrade.Synced version diffs:
Failing tests:
Checklist
Dependencies
Review Process
All PRs are reviewed by the PhysicsNeMo team before merging.
Depending on which files are changed, GitHub may automatically assign a maintainer for review.
We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.
AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.