Skip to content

Conversation

@jainapurva
Copy link
Contributor

@jainapurva jainapurva commented Nov 3, 2025

This pull request moves BlockSparseLayout and its implementation from torchao.dtypes.uintx.block_sparse_layout to torchao.prototype.dtypes.uintx.block_sparse_layout, and exposed it via torchao.prototype.dtypes while maintaining BC at torchao.prototype.dtypes.uintx with a deprecation warning for torchao v0.16.0.
Updates API documentation to reflect the changes

Reference Issue: #2752

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 3, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 9bff162 with merge base 315e9b4 (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 Nov 3, 2025
@jainapurva jainapurva added the topic: bc-breaking Use this tag if this PR breaks backward compatibility label Nov 3, 2025
…orts

- Move torchao/prototype/sparsity/block_sparse_layout.py to torchao/prototype/dtypes/uintx/block_sparse_layout.py
- Update all imports to use 'from torchao.prototype.dtypes import BlockSparseLayout'
- Update deprecation warning message
- Create torchao/prototype/dtypes/__init__.py and torchao/prototype/dtypes/uintx/__init__.py
- Remove BlockSparseLayout from torchao/prototype/sparsity/__init__.py
- Update documentation
Removed redundant imports of block sparse layout functions.
@jainapurva jainapurva marked this pull request as ready for review November 3, 2025 22:09
@jainapurva jainapurva requested a review from jerryzh168 November 3, 2025 22:10
@jainapurva jainapurva added topic: for developers Use this tag if this PR is mainly developer facing and removed topic: bc-breaking Use this tag if this PR breaks backward compatibility labels Nov 4, 2025
Copy link
Contributor

@jerryzh168 jerryzh168 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, thanks!

from torchao.dtypes.utils import (
Layout,
PlainLayout,
warnings.warn(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add #2752 to the message

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, I'd remove torchao v0.16.0 and just say "in a future release of torchao", just in case the work gets delayed

@jainapurva jainapurva force-pushed the move_block_sparsity branch 3 times, most recently from 78f5e4c to 1a75689 Compare November 5, 2025 05:06
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. topic: for developers Use this tag if this PR is mainly developer facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants