Adds the PhysicsNeMo-Mesh changes required for GLOBE 3D#1483
Adds the PhysicsNeMo-Mesh changes required for GLOBE 3D#1483peterdsharpe wants to merge 3 commits intoNVIDIA:mainfrom
Conversation
|
/blossom-ci |
Greptile SummaryThis PR extracts standalone Key changes:
Important Files Changed
|
|
/blossom-ci |
laserkelvin
left a comment
There was a problem hiding this comment.
Nice refactor! Generally LGTM, and I just added some stylistic suggestions
| """ | ||
| n_manifold_dims = relative_vectors.shape[-2] | ||
|
|
||
| if n_manifold_dims == 1: |
There was a problem hiding this comment.
This is minor style, but match/case looks better IMO for >= 3 cases
There was a problem hiding this comment.
Haha you're right, that's what the cool kids do :D I'll update
| # --------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| def _edge_lengths( |
There was a problem hiding this comment.
Nitpicking, but does this really need to be in its own function? I guess it's nice for consistency, but functionally... I'll defer to you to decide how you want to proceed
| ### Convert data dictionaries (flatten high-rank tensors for VTK compatibility) | ||
| for k, v in mesh.point_data.items(include_nested=True, leaves_only=True): | ||
| arr = v.cpu().numpy() | ||
| arr = v.float().cpu().numpy() |
There was a problem hiding this comment.
Looking at these, I wonder if it might be a bit faster (I don't know if it's critical, or helpful) if we did the tensordict.float() (maybe even with cpu()), and then within the loop work on the NumPy handles?
There was a problem hiding this comment.
Oh yeah, good catch! Likely slightly faster, and also slightly better style. Will do.
PhysicsNeMo Pull Request
Description
Extracts out the PhysicsNeMo-Mesh-related changes required to support GLOBE-3D.
A subset of changes in:
#1481
Nothing too spicy in here - mostly just minor improvements for torch.compile-friendliness and bugfixes for visualizing low-precision outputs (NumPy doesn't play nice with bf16, for example).
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.