Skip to content

Deprecate TorchAODType#4100

Merged
andrewor14 merged 1 commit intomainfrom
deprecate-torchao-dtype
Mar 19, 2026
Merged

Deprecate TorchAODType#4100
andrewor14 merged 1 commit intomainfrom
deprecate-torchao-dtype

Conversation

@andrewor14
Copy link
Copy Markdown
Contributor

@andrewor14 andrewor14 commented Mar 17, 2026

Summary: This was added for torch 2.5 as a placeholder for torch.int4. Now all torch versions we support have these dtypes, so this class is no longer needed and should not be used by anyone. We will remove it next release (0.18.0).

Test Plan: Manual testing

Deprecation notes:

Before:

TorchAODType.INT1
TorchAODType.INT2
TorchAODType.INT3
TorchAODType.INT4
TorchAODType.INT5
TorchAODType.INT6
TorchAODType.INT7

After:

torch.int1
torch.int2
torch.int3
torch.int4
torch.int5
torch.int6
torch.int7

**Summary:** This was added for torch 2.5 as a placeholder for
torch.int4. Now all torch versions we support have these dtypes,
so this class is no longer needed and should not be used by anyone.
We will remove it next release (0.18.0).

**Test Plan:** Manual testing
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Mar 17, 2026

🔗 Helpful Links

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

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

✅ No Failures

As of commit f8ed477 with merge base 95d366c (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 Mar 17, 2026
@andrewor14 andrewor14 added the module: deprecation Use this tag if this PR deprecates a feature label Mar 17, 2026
@jerryzh168
Copy link
Copy Markdown
Contributor

@andrewor14 might be good to add a deprecate note in the summary as well so you can copy paste when we do the release notes

@andrewor14
Copy link
Copy Markdown
Contributor Author

Ok added

@andrewor14 andrewor14 merged commit da11bb3 into main Mar 19, 2026
23 of 25 checks passed
andrewor14 added a commit that referenced this pull request Mar 23, 2026
**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.
andrewor14 added a commit that referenced this pull request Mar 23, 2026
**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.
andrewor14 added a commit that referenced this pull request Mar 23, 2026
**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.
andrewor14 added a commit that referenced this pull request Mar 24, 2026
**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.
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: deprecation Use this tag if this PR deprecates a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants