Skip to content

Remove WeightTensorWithLinearActivationScaleMetadata and related code - #4262

Merged
jerryzh168 merged 4 commits into
mainfrom
gh/jerryzh168/85/head
Apr 10, 2026
Merged

jerryzh168 merged 4 commits into
mainfrom
gh/jerryzh168/85/head

Conversation

@jerryzh168

@jerryzh168 jerryzh168 commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

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"

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]
@jerryzh168
jerryzh168 requested a review from andrewor14 as a code owner April 10, 2026 00:49
@pytorch-bot

pytorch-bot Bot commented Apr 10, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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:

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

claude Bot commented Apr 10, 2026 •

Copy link
Copy Markdown

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


Review of PR #4262

  • Read the PR diff and deleted file
  • Check for remaining references to removed code
  • Post review feedback

LGTM. Clean deletion with no loose ends.

What's removed:

  • torchao/quantization/linear_activation_scale.py (123 lines) — the WeightTensorWithLinearActivationScaleMetadata tensor subclass and its to_weight_tensor_with_linear_activation_scale_metadata factory function
  • The corresponding import and __all__ entry in torchao/quantization/__init__.py

Verified: No remaining references to WeightTensorWithLinearActivationScaleMetadata, to_weight_tensor_with_linear_activation_scale_metadata, or linear_activation_scale exist anywhere in the codebase. This is a safe, self-contained removal.

No issues found.

…leMetadata and related code"

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]
…elated code"

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]
@jerryzh168
jerryzh168 changed the base branch from gh/jerryzh168/85/base to main April 10, 2026 18:26
@jerryzh168
jerryzh168 merged commit 4767455 into main Apr 10, 2026
21 of 33 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