Repository navigation
Remove LinearActivationQuantizedTensor and all related code - #4258
Conversation
Summary: Remove the calibration_flow tutorial folder (static_quant.py, gptq_like.py, awq_like.py) which depended on LinearActivationQuantizedTensor and other deprecated AQT APIs. Update documentation references that pointed to these deleted files. Test Plan: - Verified no remaining references to calibration_flow/, static_quant.py, gptq_like.py, or awq_like.py in the codebase - Doc links updated to point to remaining valid resources [ghstack-poisoned]
Summary: Delete `LinearActivationQuantizedTensor` (and its alias `to_linear_activation_quantized`) as part of the ongoing AQT cleanup. This tensor subclass wrapped a weight tensor to intercept `F.linear` and quantize activations on the fly. It is no longer needed as activation quantization is handled through other mechanisms. Removed: - `torchao/quantization/linear_activation_quantized_tensor.py` (class definition) - Imports and `__all__` exports in `torchao/quantization/__init__.py` - `isinstance` guard in `_is_linear()` in `quant_api.py` - `isinstance` branch in `_quantization_type()` in `utils.py` Test Plan: - Verified no remaining imports or usage of `LinearActivationQuantizedTensor` or `to_linear_activation_quantized` in the codebase (only string literals in error messages of unrelated files remain) - CI should pass since no tests depended on this class [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/4258
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ⏳ No Failures, 7 PendingAs of commit c793f08 with merge base fee43b5 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Summary: Delete `LinearActivationQuantizedTensor` (and its alias `to_linear_activation_quantized`) as part of the ongoing AQT cleanup. This tensor subclass wrapped a weight tensor to intercept `F.linear` and quantize activations on the fly. It is no longer needed as activation quantization is handled through other mechanisms. Removed: - `torchao/quantization/linear_activation_quantized_tensor.py` (class definition) - Imports and `__all__` exports in `torchao/quantization/__init__.py` - `isinstance` guard in `_is_linear()` in `quant_api.py` - `isinstance` branch in `_quantization_type()` in `utils.py` Test Plan: - Verified no remaining imports or usage of `LinearActivationQuantizedTensor` or `to_linear_activation_quantized` in the codebase (only string literals in error messages of unrelated files remain) - CI should pass since no tests depended on this class ghstack-source-id: 7979b7f Pull Request resolved: #4258
|
@claude review |
|
Claude finished @jerryzh168's task in 1m 23s —— View job Review: Remove LinearActivationQuantizedTensor and all related code
Verdict: This PR looks good. The deletion is clean and well-scoped. Changes reviewed
Minor nit: stale string referencesThere are a few leftover string literals referencing
These look like they were copy-pasted from the original No issues found
LGTM. |
… all related code" Summary: Delete `LinearActivationQuantizedTensor` (and its alias `to_linear_activation_quantized`) as part of the ongoing AQT cleanup. This tensor subclass wrapped a weight tensor to intercept `F.linear` and quantize activations on the fly. It is no longer needed as activation quantization is handled through other mechanisms. Removed: - `torchao/quantization/linear_activation_quantized_tensor.py` (class definition) - Imports and `__all__` exports in `torchao/quantization/__init__.py` - `isinstance` guard in `_is_linear()` in `quant_api.py` - `isinstance` branch in `_quantization_type()` in `utils.py` Test Plan: - Verified no remaining imports or usage of `LinearActivationQuantizedTensor` or `to_linear_activation_quantized` in the codebase (only string literals in error messages of unrelated files remain) - CI should pass since no tests depended on this class [ghstack-poisoned]
Summary: Delete `LinearActivationQuantizedTensor` (and its alias `to_linear_activation_quantized`) as part of the ongoing AQT cleanup. This tensor subclass wrapped a weight tensor to intercept `F.linear` and quantize activations on the fly. It is no longer needed as activation quantization is handled through other mechanisms. Removed: - `torchao/quantization/linear_activation_quantized_tensor.py` (class definition) - Imports and `__all__` exports in `torchao/quantization/__init__.py` - `isinstance` guard in `_is_linear()` in `quant_api.py` - `isinstance` branch in `_quantization_type()` in `utils.py` Test Plan: - Verified no remaining imports or usage of `LinearActivationQuantizedTensor` or `to_linear_activation_quantized` in the codebase (only string literals in error messages of unrelated files remain) - CI should pass since no tests depended on this class [ghstack-poisoned]
Summary: Delete `LinearActivationQuantizedTensor` (and its alias `to_linear_activation_quantized`) as part of the ongoing AQT cleanup. This tensor subclass wrapped a weight tensor to intercept `F.linear` and quantize activations on the fly. It is no longer needed as activation quantization is handled through other mechanisms. Removed: - `torchao/quantization/linear_activation_quantized_tensor.py` (class definition) - Imports and `__all__` exports in `torchao/quantization/__init__.py` - `isinstance` guard in `_is_linear()` in `quant_api.py` - `isinstance` branch in `_quantization_type()` in `utils.py` Test Plan: - Verified no remaining imports or usage of `LinearActivationQuantizedTensor` or `to_linear_activation_quantized` in the codebase (only string literals in error messages of unrelated files remain) - CI should pass since no tests depended on this class ghstack-source-id: d60e636 Pull Request resolved: #4258
|
we'll address minor issues by removing these subclass in follow up PRs |
Stack from ghstack (oldest at bottom):
Summary:
Delete
LinearActivationQuantizedTensor(and its aliasto_linear_activation_quantized)as part of the ongoing AQT cleanup. This tensor subclass wrapped a weight tensor to
intercept
F.linearand quantize activations on the fly. It is no longer needed asactivation quantization is handled through other mechanisms.
Removed:
torchao/quantization/linear_activation_quantized_tensor.py(class definition)__all__exports intorchao/quantization/__init__.pyisinstanceguard in_is_linear()inquant_api.pyisinstancebranch in_quantization_type()inutils.pyTest Plan:
LinearActivationQuantizedTensororto_linear_activation_quantizedin the codebase (only string literals in errormessages of unrelated files remain)