Deprecate AQT and related classes#4074
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/4074
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 1415fd9 with merge base 95d366c ( BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
8a58d03 to
36585fc
Compare
| common_utils.instantiate_parametrized_tests(TestAffineQuantizedBasic) | ||
|
|
||
|
|
||
| class TestAQTDeprecation(TestCase): |
There was a problem hiding this comment.
just delete this, I don't think we should test Python stl
| def __post_init__(self): | ||
| super().__post_init__() | ||
| warnings.warn( | ||
| "Deprecation: CutlassSemiSparseLayout is deprecated and will be removed in a future release of torchao" |
There was a problem hiding this comment.
this should link to an github issue with more info, you can use the main AQT deprecation issue
36585fc to
368114c
Compare
**Summary:** Deprecate AffineQuantizedTensor, AQTTensorImpl, Layout, and all subclasses of the above in torchao.dtypes. We are planning to remove these classes in the future, so we deprecate them here in advance. ``` ● Here are all the classes that now have new deprecation warnings: Base classes (torchao/dtypes/utils.py): 1. Layout 2. PlainLayout 3. AQTTensorImpl torchao/dtypes/affine_quantized_tensor.py: 4. AffineQuantizedTensor torchao/dtypes/floatx/: 5. Float8Layout 6. Float8AQTTensorImpl 7. CutlassSemiSparseLayout 8. CutlassSemiSparseTensorImpl torchao/dtypes/uintx/: 9. TensorCoreTiledLayout 10. TensorCoreTiledAQTTensorImpl 11. SemiSparseLayout 12. SemiSparseAQTTensorImpl 13. Int4CPULayout 14. Int4CPUAQTTensorImpl 15. Int4XPULayout 16. Int4XPUAQTTensorImpl 17. QDQLayout 18. QDQTensorImpl 19. PlainAQTTensorImpl 20. PackedLinearInt8DynamicActivationIntxWeightLayout 21. PackedLinearInt8DynamicActivationIntxWeightAQTTensorImpl ``` More context here: #2752 **Test Plan:** Manual testing
368114c to
1415fd9
Compare
|
maybe just delete some of the layouts? we have been talking about deprecation of the corresponding v1 configs for a while |
Yeah we can, I think we can also just delete them in 0.18.0 with everything else, which may be simpler |
**Summary:** Deprecate AffineQuantizedTensor, AQTTensorImpl, Layout, and all subclasses of the above in torchao.dtypes. We are planning to remove these classes in the future, so we deprecate them here in advance. ``` ● Here are all the classes that now have new deprecation warnings: Base classes (torchao/dtypes/utils.py): 1. Layout 2. PlainLayout 3. AQTTensorImpl torchao/dtypes/affine_quantized_tensor.py: 4. AffineQuantizedTensor torchao/dtypes/floatx/: 5. Float8Layout 6. Float8AQTTensorImpl 7. CutlassSemiSparseLayout 8. CutlassSemiSparseTensorImpl torchao/dtypes/uintx/: 9. TensorCoreTiledLayout 10. TensorCoreTiledAQTTensorImpl 11. SemiSparseLayout 12. SemiSparseAQTTensorImpl 13. Int4CPULayout 14. Int4CPUAQTTensorImpl 15. Int4XPULayout 16. Int4XPUAQTTensorImpl 17. QDQLayout 18. QDQTensorImpl 19. PlainAQTTensorImpl 20. PackedLinearInt8DynamicActivationIntxWeightLayout 21. PackedLinearInt8DynamicActivationIntxWeightAQTTensorImpl ``` More context here: #2752 **Test Plan:** Manual testing
**Summary:** Deprecate AffineQuantizedTensor, AQTTensorImpl, Layout, and all subclasses of the above in torchao.dtypes. We are planning to remove these classes in the future, so we deprecate them here in advance. ``` ● Here are all the classes that now have new deprecation warnings: Base classes (torchao/dtypes/utils.py): 1. Layout 2. PlainLayout 3. AQTTensorImpl torchao/dtypes/affine_quantized_tensor.py: 4. AffineQuantizedTensor torchao/dtypes/floatx/: 5. Float8Layout 6. Float8AQTTensorImpl 7. CutlassSemiSparseLayout 8. CutlassSemiSparseTensorImpl torchao/dtypes/uintx/: 9. TensorCoreTiledLayout 10. TensorCoreTiledAQTTensorImpl 11. SemiSparseLayout 12. SemiSparseAQTTensorImpl 13. Int4CPULayout 14. Int4CPUAQTTensorImpl 15. Int4XPULayout 16. Int4XPUAQTTensorImpl 17. QDQLayout 18. QDQTensorImpl 19. PlainAQTTensorImpl 20. PackedLinearInt8DynamicActivationIntxWeightLayout 21. PackedLinearInt8DynamicActivationIntxWeightAQTTensorImpl ``` More context here: #2752 **Test Plan:** Manual testing
**Summary:** #4074 and #4100 deprecated a few classes, but this triggered the following warnings when the user imports torchao from the top-level. This commit suppresses these warnings in this case. Before: ``` /data/users/andrewor/ao/torchao/dtypes/utils.py:89: UserWarning: Deprecation: PlainLayout is deprecated and will be removed in a future release of torchao, see #2752 for more details warnings.warn( /data/users/andrewor/ao/torchao/quantization/quant_primitives.py:95: UserWarning: Deprecation: TorchAODType is deprecated, please use the torch.intN dtype instead (e.g. TorchAODType.INT4 -> torch.int4) warnings.warn( /data/users/andrewor/ao/torchao/dtypes/utils.py:89: UserWarning: Deprecation: PlainLayout is deprecated and will be removed in a future release of torchao, see #2752 for more details warnings.warn( ``` After: ``` ``` **Test Plan:** Manual testing.
**Summary:** #4074 and #4100 deprecated a few classes, but this triggered the following warnings when the user imports torchao from the top-level. This commit suppresses these warnings in this case. Before: ``` import torchao /data/users/andrewor/ao/torchao/dtypes/utils.py:89: UserWarning: Deprecation: PlainLayout is deprecated and will be removed in a future release of torchao, see #2752 for more details warnings.warn( /data/users/andrewor/ao/torchao/quantization/quant_primitives.py:95: UserWarning: Deprecation: TorchAODType is deprecated, please use the torch.intN dtype instead (e.g. TorchAODType.INT4 -> torch.int4) warnings.warn( /data/users/andrewor/ao/torchao/dtypes/utils.py:89: UserWarning: Deprecation: PlainLayout is deprecated and will be removed in a future release of torchao, see #2752 for more details warnings.warn( ``` After: ``` import torchao \# No warnings ``` **Test Plan:** Manual testing.
**Summary:** #4074 and #4100 deprecated a few classes, but this triggered the following warnings when the user imports torchao from the top-level. This commit suppresses these warnings in this case. Before: ``` import torchao /data/users/andrewor/ao/torchao/dtypes/utils.py:89: UserWarning: Deprecation: PlainLayout is deprecated and will be removed in a future release of torchao, see #2752 for more details warnings.warn( /data/users/andrewor/ao/torchao/quantization/quant_primitives.py:95: UserWarning: Deprecation: TorchAODType is deprecated, please use the torch.intN dtype instead (e.g. TorchAODType.INT4 -> torch.int4) warnings.warn( /data/users/andrewor/ao/torchao/dtypes/utils.py:89: UserWarning: Deprecation: PlainLayout is deprecated and will be removed in a future release of torchao, see #2752 for more details warnings.warn( ``` After: ``` import torchao \# No warnings ``` **Test Plan:** Manual testing.
**Summary:** #4074 and #4100 deprecated a few classes, but this triggered the following warnings when the user imports torchao from the top-level. This commit suppresses these warnings in this case. Before: ``` import torchao /data/users/andrewor/ao/torchao/dtypes/utils.py:89: UserWarning: Deprecation: PlainLayout is deprecated and will be removed in a future release of torchao, see #2752 for more details warnings.warn( /data/users/andrewor/ao/torchao/quantization/quant_primitives.py:95: UserWarning: Deprecation: TorchAODType is deprecated, please use the torch.intN dtype instead (e.g. TorchAODType.INT4 -> torch.int4) warnings.warn( /data/users/andrewor/ao/torchao/dtypes/utils.py:89: UserWarning: Deprecation: PlainLayout is deprecated and will be removed in a future release of torchao, see #2752 for more details warnings.warn( ``` After: ``` import torchao \# No warnings ``` **Test Plan:** Manual testing.
Summary: Deprecate AffineQuantizedTensor, AQTTensorImpl, Layout, and all subclasses of the above in torchao.dtypes. We are planning to remove these classes in the future, so we deprecate them here in advance.
More context here: #2752
Test Plan:
Manual testing