-
Notifications
You must be signed in to change notification settings - Fork 257
Arm_inductor_quantizer for Pt2e quantization #2139
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
base: main
Are you sure you want to change the base?
Arm_inductor_quantizer for Pt2e quantization #2139
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2139
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 12ecd5a with merge base c9b9adc ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
This pr is moved from torch to torchao due to the Pt2e migration to torchao old pr link |
Hi @jerryzh168, can you please add the required labels to trigger the pipelines. |
please fix ruff errors, you can install pre-commit so it can run automatically when you add a new commit |
09d29c5
to
14f1713
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: arm_inductor
for ruff, we are using 0.11.6 and you can run |
ruff- I001 standard intrgrated.
14f1713
to
faba744
Compare
rename test_arminductor_quantizer.py --> test_arm_inductor_quantizer.py applied ruff format
faba744
to
12ecd5a
Compare
@jerryzh168 Looks like Devang has pushed the fix. Can you now trigger the pipelines again. |
done, I also just added @choudhary-devang as a contributor |
btw, for inductor fusion passes, you can add to torchao/quantization/pt2e/inductor_passes/ folder for now |
How will this be tested in CI? |
Hi @jerryzh168, thanks for adding me as a contributor, and sure i will add the lowering changes for weight as |
I think currently this isn't covered in CI, Once the test file (https://github.com/pytorch/ao/pull/2139/files#diff-af6ea96fb55af02d2e1c7837c198f7d73a38d542b5ea7000e683422a6b7ca17b) is made part of the CI execution. Then, any change to X86InductorQuantizer will trigger test failures if it breaks ArmInductorQuantizer. These test files both from x86 and ARM might need to be added to CI execution later on. |
Looks like the CUDA nightly pipeline failing is unrelated to this PR and is failing in all other open PR's as well. |
Title: Enable PyTorch 2 Export Quantization path for ARM CPUs.
Description:
Key Changes:
Introduces ARM-specific support by leveraging oneDNN kernels for matmuls and convolution.
Integrates pre-defined configuration selection to automatically choose the best quantization settings based on the selected quantization method.
Provides customization options via two flags:
These options allow users to tailor the quantization process for their specific workload requirements (e.g., using QAT for fine-tuning or PTQ for calibration-based quantization).
Testing and Validation:
The new ARM flow has been thoroughly tested across a range of models with all combinations:
NLP: Models such as BERT and T5.
Vision: Models like ResNet and ViT.
Custom Models: user defined models with various operators.
example script:
cc: @jerryzh168, @fadara01, @Xia-Weiwen