-
Notifications
You must be signed in to change notification settings - Fork 317
[CPU] Introduce Int4WoqCpuTensor to replace Int4CPULayout in AQT #2798
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?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2798
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 9012a61 with merge base 72b35bf ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Pull Request Overview
This PR introduces Int4WoqCpuTensor
as a replacement for AQT tensor with Int4CPULayout
to support int4 weight-only quantization on CPU with groupwise quantization.
Key changes:
- Adds new
Int4WoqCpuTensor
class for CPU-specific int4 weight-only quantization - Integrates the new tensor type into the quantization API and workflow system
- Adds comprehensive test coverage for the new tensor implementation
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
torchao/quantization/quantize_/workflows/int4/int4_woq_cpu_tensor.py | Implements the core Int4WoqCpuTensor class with CPU-optimized int4 quantization |
torchao/quantization/quantize_/workflows/init.py | Adds export for the new tensor class |
torchao/quantization/quantize_/common/packing_format.py | Adds INT4_WOQ_CPU packing format enum value |
torchao/quantization/quant_api.py | Integrates new tensor into quantization workflow |
torchao/quantization/init.py | Adds public API export for the tensor class |
test/quantization/quantize_/workflows/int4/test_int4_woq_cpu_tensor.py | Comprehensive test suite for the new tensor implementation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
This PR adds
Int4WoqCpuTensor
to replace the AQT tensor withInt4CPULayout
since AQT will be deprecated.Test plan