Skip to content

Remove WeightTensorWithLinearActivationQuantizationMetadata#4263

Merged
jerryzh168 merged 5 commits intomainfrom
gh/jerryzh168/86/head
Apr 10, 2026
Merged

Remove WeightTensorWithLinearActivationQuantizationMetadata#4263
jerryzh168 merged 5 commits intomainfrom
gh/jerryzh168/86/head

Conversation

@jerryzh168
Copy link
Copy Markdown
Contributor

@jerryzh168 jerryzh168 commented Apr 10, 2026

Stack from ghstack (oldest at bottom):

Summary:
Delete weight_tensor_linear_activation_quantization.py which defined
WeightTensorWithLinearActivationQuantizationMetadata. No other files
imported or referenced this class.

Test Plan:
python -c "import torchao.quantization"

Summary:
Delete `linear_activation_weight_observed_tensor.py` and the
`insert_observers_` function that depended on it. Also remove the
`TestLinearObserver` test class and unused imports.

Test Plan:
pytest test/quantization/test_observer.py -x

[ghstack-poisoned]
Summary:
Delete `linear_activation_scale.py` which defined
`WeightTensorWithLinearActivationScaleMetadata` and its helper
`to_weight_tensor_with_linear_activation_scale_metadata`. Remove the
import and `__all__` entry from `torchao/quantization/__init__.py`.

Test Plan:
python -c "import torchao.quantization"

[ghstack-poisoned]
Summary:
Delete `weight_tensor_linear_activation_quantization.py` which defined
`WeightTensorWithLinearActivationQuantizationMetadata`. No other files
imported or referenced this class.

Test Plan:
python -c "import torchao.quantization"

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 10, 2026

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

⏳ No Failures, 6 Pending

As of commit 5d85953 with merge base 6f9a604 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla 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 Apr 10, 2026
@jerryzh168 jerryzh168 added the module: not user facing Use this tag if you don't want this PR to show up in release notes label Apr 10, 2026
@andrewor14
Copy link
Copy Markdown
Contributor

@claude review

@claude
Copy link
Copy Markdown

claude Bot commented Apr 10, 2026

Claude finished @andrewor14's task in 42s —— View job


Review of PR #4263: Remove WeightTensorWithLinearActivationQuantizationMetadata

  • Read the deleted file and understand what's being removed
  • Check for any remaining references to the deleted class
  • Check __init__.py and other imports
  • Post review feedback

Summary

Clean deletion. The removed file defined WeightTensorWithLinearActivationQuantizationMetadata (a TorchAOBaseTensor subclass for wrapping weight tensors with static activation quantization metadata) and its factory function to_weight_tensor_with_linear_activation_quantization_metadata.

Verification

I confirmed there are zero remaining references in the codebase to:

  • WeightTensorWithLinearActivationQuantizationMetadata
  • to_weight_tensor_with_linear_activation_quantization_metadata
  • weight_tensor_linear_activation_quantization (the module name)

No __init__.py files import from the deleted module. This is a safe removal with no loose ends.

LGTM — no issues found.

…ntizationMetadata"

Summary:
Delete `weight_tensor_linear_activation_quantization.py` which defined
`WeightTensorWithLinearActivationQuantizationMetadata`. No other files
imported or referenced this class.

Test Plan:
python -c "import torchao.quantization"

[ghstack-poisoned]
Summary:
Delete `weight_tensor_linear_activation_quantization.py` which defined
`WeightTensorWithLinearActivationQuantizationMetadata`. No other files
imported or referenced this class.

Test Plan:
python -c "import torchao.quantization"

[ghstack-poisoned]
@jerryzh168 jerryzh168 changed the base branch from gh/jerryzh168/86/base to main April 10, 2026 18:27
@jerryzh168 jerryzh168 merged commit b5cd236 into main Apr 10, 2026
26 of 34 checks passed
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. module: not user facing Use this tag if you don't want this PR to show up in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants