Skip to content

Duplicate pt2e quant code from pytorch/pytorch to pytorch/ao #1916

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 6 commits into from

Conversation

jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Mar 18, 2025

Summary:
First step of https://dev-discuss.pytorch.org/t/torch-ao-quantization-migration-plan/2810

core logic of pt2e are duplicated, and also ported test here

Next:

  • move meta internal callsites to depend on torchao
  • Docs will be migrated separately

Test Plan:
pytest test/quantization/pt2e_flow

Reviewers:

Subscribers:

Tasks:

Tags:

Summary:
First step of https://dev-discuss.pytorch.org/t/torch-ao-quantization-migration-plan/2810

core logic of pt2e are duplicated, and also ported test here

Next:
move meta internal callsites to depend on torchao

Test Plan:
pytest test/quantization/pt2e_flow

Reviewers:

Subscribers:

Tasks:

Tags:
Copy link

pytorch-bot bot commented Mar 18, 2025

🔗 Helpful Links

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

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

❌ 9 New Failures

As of commit 297c990 with merge base f38c272 (image):

NEW FAILURES - The following jobs have failed:

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 Mar 18, 2025
@jerryzh168 jerryzh168 changed the title Migrate pt2e quant code from pytorch/pytorch to pytorch/ao Duplicate pt2e quant code from pytorch/pytorch to pytorch/ao Mar 18, 2025
@jerryzh168 jerryzh168 added the topic: new feature Use this tag if this PR adds a new feature label Mar 18, 2025
jerryzh168 added a commit to jerryzh168/ao that referenced this pull request Apr 12, 2025
Summary:
First step of dev-discuss.pytorch.org/t/torch-ao-quantization-migration-plan/2810

core logic of pt2e are duplicated, and also ported test here

previous unfinished migration: pytorch#1916

Next:

move meta internal callsites to depend on torchao
Docs will be migrated separately

Test Plan:
pytest test/quantization/pt2e_flow

Reviewers:

Subscribers:

Tasks:

Tags:
@jerryzh168
Copy link
Contributor Author

recreted: #2048

@jerryzh168 jerryzh168 closed this Apr 12, 2025
jerryzh168 added a commit that referenced this pull request Apr 15, 2025
* Copy and adapt pt2e quantization code to torchao

Summary:
First step of dev-discuss.pytorch.org/t/torch-ao-quantization-migration-plan/2810

core logic of pt2e are duplicated, and also ported test here

previous unfinished migration: #1916

Next:

move meta internal callsites to depend on torchao
Docs will be migrated separately

Test Plan:
pytest test/quantization/pt2e_flow

Reviewers:

Subscribers:

Tasks:

Tags:

* fix import

* update

* import

* import

* import version check

* import

* guard pytorch version for op

* torchao_quant namespace

* rename namespace to torchao

* trigger CI

* working around 'test_int4.quantize_per_tensor_int4' has no overload name 'default' issue

* fix

* debug why the test failed

* skip test due to out dated nightly
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. topic: new feature Use this tag if this PR adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants