Skip to content

Add unit test for torch compile #872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 15, 2025

Conversation

shrek
Copy link
Contributor

@shrek shrek commented May 5, 2025

PhysicsNeMo Pull Request

Description

Unit tests for optimizations are missing a test for torch compile.

This test helps detect Graph breaks in model code which are detrimental to performance when models are compiled. For models where fullgraph capture works (fno, songunet), this test will ensure that model code updates dont break it. For other models this test shows graphbreaks so they can be fixed. (dlwp_healpix_unet - graphbreaks due to nvtx annotations, graphcast - graphbreaks due cpu tensors etc)

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
  • The CHANGELOG.md is up to date with these changes.
  • An issue is linked to this pull request.

Dependencies

Ramu Ramamurthy and others added 2 commits May 5, 2025 15:56
Graph breaks in model code are detrimental to performance when
models are compiled. Add a test for fullgraph compile of models.
For models where fullgraph capture works (fno, songunet), this test will
ensure that model code updates dont break it. For the other models
(healpix, graphcast) this test shows graphbreaks so they can be fixed.

Signed-off-by: Ramu Ramamurthy <[email protected]>
@shrek shrek changed the title Add test for fullgraph compile Add test for torch compile May 9, 2025
@shrek shrek changed the title Add test for torch compile Add unit test for torch compile May 9, 2025
Ramu Ramamurthy added 2 commits May 12, 2025 15:53
Signed-off-by: Ramu Ramamurthy <[email protected]>
@jialusui1102
Copy link
Collaborator

LGTM!

@CharlelieLrt CharlelieLrt self-requested a review May 14, 2025 20:29
Copy link
Collaborator

@CharlelieLrt CharlelieLrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@CharlelieLrt
Copy link
Collaborator

/blossom-ci

@CharlelieLrt CharlelieLrt merged commit 26bc1a5 into NVIDIA:main May 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants