8000 Enable the AMP precision with freezing for CPU nightly test by LifengWang · Pull Request #152298 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Enable the AMP precision with freezing for CPU nightly test #152298

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

Closed
wants to merge 9 commits into from

Conversation

LifengWang
Copy link
Contributor

Hi, @desertfire. Since we recommend users to use AMP precision and run with --freezing for CPU x86 Inductor inference, we suggest adding the AMP freezing test to the CPU nightly tests.

cc @chuanqi129 @zxd1997066

8000
@LifengWang LifengWang requested a review from a team as a code owner April 28, 2025 03:28
Copy link
pytorch-bot bot commented Apr 28, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/152298

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (2 Unrelated Failures)

As of commit a943926 with merge base 190f76f (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: releng release notes category label Apr 28, 2025
@soulitzer soulitzer added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Apr 28, 2025
@LifengWang
Copy link
Contributor Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased freezing_nightly onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout freezing_nightly && git pull --rebase)

@LifengWang
Copy link
Contributor Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased freezing_nightly onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout freezing_nightly && git pull --rebase)

@LifengWang
Copy link
Contributor Author

Hi, @desertfire. I enhanced this PR according to your comments. Could you please help review it?

name: linux-jammy-cpu-py3.9-gcc11-inductor
uses: ./.github/workflows/_linux-test.yml
needs: linux-jammy-cpu-py3_9-gcc11-inductor-build
if: github.event.schedule == '0 7 * * *' || github.event_name == 'pull_request'
Copy link
Contributor

Choose a reason for hiding this comment

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

This means we will test both freezing ON and OFF every night. Is this really we want here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I remember that you mentioned that we need to keep the default test. Maybe we can just run a few tests with freezing off?

Copy link
Contributor

Choose a reason for hiding this comment

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

Did you trigger a dashboard run? Do you have a dashboard link shows how the data is going to be displayed?

Copy link
Contributor Author
@LifengWang LifengWang May 30, 2025

Choose a reason for hiding this comment

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

Hi @desertfire. I checked the dashboard page for the performance data related to freezing using the following link . Set the time range to the last 14 days, precision to AMP, and device to CPU (x86).
It appears that the freezing test configuration is already included in the dashboard, but no performance data is being displayed.
image

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I see two problems here:

  1. The landing page of the OSS dashboard defaults to bf16 for inference. If a user selects x86 as the inference backend, they will see an empty page thinking the system is down or something.
  2. If you think freezing should be default, we should avoid testing the non-freezing one to cut the hardware expense. Also the names with freezing on is too long which should be fixed.

UI fixes need to be done in https://github.com/pytorch/test-infra.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, @desertfire. Now I have removed the non-freezing test, and the test results in the HUD are as follows. Would it make sense to update the CI tests in this PR first, and address the dashboard changes in a follow-up?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, @huydhn, do you have any insights for the dashboard update? Since we want to update the CPU nightly test using the freezing model.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for not seeing your message earlier! It's ok to land this first and update the dashboard later

cc @yangw-dev

@@ -1,6 +1,9 @@
name: inductor-perf-nightly-x86

on:
pull_request:
paths:
- .github/workflows/inductor-perf-test-nightly-x86.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: not really necessary since the file will be updated occasionally, and you can always manually trigger a run when needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. I added this code so that the PR can trigger the nightly test. I will remove it later.

@LifengWang
Copy link
Contributor Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased freezing_nightly onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout freezing_nightly && git pull --rebase)

name: linux-jammy-cpu-py3.9-gcc11-inductor
uses: ./.github/workflows/_linux-test.yml
needs: linux-jammy-cpu-py3_9-gcc11-inductor-build
if: github.event.schedule == '0 7 * * *'
if: github.event.schedule == '0 7 * * *' || github.event_name == 'pull_request'
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that you will remove || github.event_name == 'pull_request' part before landing this?

A92D Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if: github.event.schedule == '0 7 * * *' || github.event_name == 'pull_request'
if: github.event.schedule == '0 7 * * *'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume that you will remove || github.event_name == 'pull_request' part before landing this?

Sure. I have removed the PR trigger for this job.

Copy link
Contributor
@huydhn huydhn left a comment

Choose a reason for hiding this comment

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

Please clean up the pull_request trigger before landing. I could help with the dashboard update to use amp by default for cpu benchmark

@LifengWang
Copy link
Contributor Author

@pytorchmergebot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 30, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: releng release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0