Skip to content

Remove deprecated torchao/dtypes package - #4696

Merged
vkuzo merged 1 commit into
mainfrom
gh/vkuzo/293/head
Aug 5, 2026
Merged

vkuzo merged 1 commit into
mainfrom
gh/vkuzo/293/head

Conversation

@vkuzo

@vkuzo vkuzo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The torchao/dtypes package had already been reduced to a single
backward-compat stub (torchao/dtypes/init.py exporting an empty
AffineQuantizedTensor) after AQT, all Layout classes, NF4Tensor, and the
bitpacking utilities were moved or deleted in prior work. This removes the
stub and the internal bookkeeping that pointed at it.

Changes:

  • Delete torchao/dtypes/ (the last tracked file, init.py).
  • torchao/init.py: drop the from . import dtypes import and the
    "dtypes" entry from all.
  • torchao/core/config.py: remove "torchao.dtypes" from ALLOWED_AO_MODULES.
  • CODEOWNERS: drop the /torchao/dtypes/ ownership line.
  • naive_intNwo.py: strip dead code that imported the now-removed
    to_affine_quantized_intx from torchao.dtypes; the config/transform is
    kept (siblings import it) and now just raises on use, as before.
  • prototype/mx_formats/kernels.py: drop the stale provenance comment
    pointing at the removed torchao/dtypes/uint4.py.

Test plan:

  • python -c "import torchao" succeeds.
  • python -c "import torchao.dtypes" raises ModuleNotFoundError (expected).
  • python -c "import torchao.core.config" succeeds.
  • pytest test/core/test_config.py passes (23 passed).
  • Repo-wide grep for torchao.dtypes / torchao/dtypes over torchao/,
    test/, benchmarks/, and docs/ returns no matches.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

[ghstack-poisoned]
@vkuzo
vkuzo requested a review from drisspg as a code owner August 5, 2026 10:47
@vkuzo

vkuzo commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Stack from ghstack (oldest at bottom):

@pytorch-bot

pytorch-bot Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 1 Pending

As of commit 7c3fbd2 with merge base 623c463 (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 Aug 5, 2026
@vkuzo vkuzo added the module: not user facing Use this tag if you don't want this PR to show up in release notes label Aug 5, 2026
@andrewor14 andrewor14 added the module: bc-breaking Use this tag if this PR breaks backward compatibility label Aug 5, 2026
@vkuzo
vkuzo merged commit ff9db6e into main Aug 5, 2026
67 of 72 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: bc-breaking Use this tag if this PR breaks backward compatibility 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