-
Notifications
You must be signed in to change notification settings - Fork 360
Move cutlass_int4_packed_layout to prototype #3277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: move_block_sparsity
Are you sure you want to change the base?
Conversation
- Moved cutlass_int4_packed_layout.py from torchao/dtypes/uintx/ to torchao/prototype/dtypes/uintx/ - Created torchao/prototype/dtypes/__init__.py and uintx/__init__.py to export CutlassInt4PackedLayout - Replaced old file with backward compatibility stub that imports from new location - Added deprecation warning for old import path (to be removed in v0.16.0) - Updated torchao/dtypes/__init__.py to re-export from prototype for backward compatibility - Updated internal imports in affine_quantized_tensor_ops.py to use new prototype location - Removed CutlassInt4PackedLayout from torchao/dtypes/uintx/__init__.py to avoid circular imports - Updated documentation to move CutlassInt4PackedLayout to Prototype section All import paths work: - New: from torchao.prototype.dtypes import CutlassInt4PackedLayout - Backward compat: from torchao.dtypes import CutlassInt4PackedLayout - Deprecated: from torchao.dtypes.uintx.cutlass_int4_packed_layout import CutlassInt4PackedLayout
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3277
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 42acafa with merge base 315e9b4 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
Removed unused import for CutlassInt4PackedLayout.
Removed __all__ exports from cutlass_int4_packed_layout.py
6c03ed4 to
8c18d4d
Compare
docs/source/api_ref_dtypes.rst
Outdated
| FloatxTensor | ||
| FloatxTensorCoreLayout | ||
| MarlinSparseLayout | ||
| BlockSparseLayout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it's both? maybe try to split would be better, or update the summary to say it's two things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in two separate PRs:
Pr for BlockSparseLayout: #3276
This one is for CutlassInt4PackedLayout
| from torchao.dtypes.utils import ( | ||
| Layout, | ||
| PlainLayout, | ||
| warnings.warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a test for warning as well? example
| warnings.catch_warnings(record=True) as caught_warnings, |
| if bias is not None: | ||
| y += bias | ||
| return y | ||
| from torchao.prototype.dtypes.uintx.block_sparse_layout import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this keeps BC I think we should remove the bc-breaking label
…utlass_int4_packed_layout
| ) | ||
| from torchao.dtypes.uintx.plain_layout import ( | ||
| _aqt_is_int8, | ||
| warnings.warn( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
8ebbb9c to
9cce063
Compare
9cce063 to
78f5e4c
Compare
…utlass_int4_packed_layout
78f5e4c to
1a75689
Compare
…utlass_int4_packed_layout
1a75689 to
9bff162
Compare
This pull request moves
CutlassInt4PackedLayoutand its implementation fromtorchao/dtypes/uintx/cutlass_int4_packed_layout.pytotorchao/prototype/dtypes/uintx/cutlass_int4_packed_layout.py, and exposed it viatorchao.prototype.dtypeswhile maintaining BC attorchao.prototype.dtypes.uintxwith a deprecation warning for torchao v0.16.0.Updates API documentation to reflect the changes
Reference Issue: #2752