Skip to content
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

training ir torchao migration #1006

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

yushangdi
Copy link
Contributor

Summary: Migrate capture_pre_autograd_graph to export_for_training.

Differential Revision: D63859678

Copy link

pytorch-bot bot commented Oct 3, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 567ee57 with merge base 0ffbf85 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 3, 2024
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D63859678

yushangdi added a commit to yushangdi/ao that referenced this pull request Oct 3, 2024
Summary:

Migrate capture_pre_autograd_graph to export_for_training.

Differential Revision: D63859678
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D63859678

yushangdi added a commit to yushangdi/ao that referenced this pull request Oct 3, 2024
Summary:

Migrate capture_pre_autograd_graph to export_for_training.

We still need to keep capture_pre_autograd_graph call because torch/ao's CI tests uses earlier version of pytorch that does not have export_for_training.

Differential Revision: D63859678
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D63859678

@@ -26,6 +25,12 @@
)
import copy

has_export_for_training = False
try:
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be done through a version guard? when does export_for_training start to work?

Copy link
Contributor Author

@yushangdi yushangdi Oct 4, 2024

Choose a reason for hiding this comment

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

can this be done through a version guard? when does export_for_training start to work?

it starts to exist in 2.5.0-rc1. I can make it a version guard. Thanks for the comment!

Copy link
Contributor

Choose a reason for hiding this comment

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

we have some utils here btw:

ao/torchao/utils.py

Lines 25 to 29 in 0ffbf85

"TORCH_VERSION_AT_LEAST_2_2",
"TORCH_VERSION_AT_LEAST_2_3",
"TORCH_VERSION_AT_LEAST_2_4",
"TORCH_VERSION_AT_LEAST_2_5",
"TORCH_VERSION_AT_LEAST_2_6",

but notice that it's does not exactly map to current meaning of version, e.g.

TORCH_VERSION_AT_LEAST_2_5 == 2.5.0 or 2.5.0.dev
(instead of 2.5.0 + 2.6.0.dev)

yushangdi added a commit to yushangdi/ao that referenced this pull request Oct 4, 2024
Summary:

Migrate capture_pre_autograd_graph to export_for_training.

We still need to keep capture_pre_autograd_graph call because torch/ao's CI tests uses earlier version of pytorch that does not have export_for_training.

See https://github.com/pytorch/ao/blob/main/.github/workflows/regression_test.yml

Differential Revision: D63859678
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D63859678

yushangdi added a commit to yushangdi/ao that referenced this pull request Oct 4, 2024
Summary:

Migrate capture_pre_autograd_graph to export_for_training.

We still need to keep capture_pre_autograd_graph call because torch/ao's CI tests uses earlier version of pytorch that does not have export_for_training.

See https://github.com/pytorch/ao/blob/main/.github/workflows/regression_test.yml

Differential Revision: D63859678
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D63859678

Summary:

Migrate capture_pre_autograd_graph to export_for_training.

We still need to keep capture_pre_autograd_graph call because torch/ao's CI tests uses earlier version of pytorch that does not have export_for_training.

See https://github.com/pytorch/ao/blob/main/.github/workflows/regression_test.yml

Differential Revision: D63859678
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D63859678

@facebook-github-bot facebook-github-bot merged commit d2982d5 into pytorch:main Oct 4, 2024
18 of 19 checks passed
melvinebenezer pushed a commit to melvinebenezer/ao that referenced this pull request Oct 7, 2024
Differential Revision: D63859678

Pull Request resolved: pytorch#1006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants