make float8 a1x128_w128x128 granularity serializeable#3279
Merged
Conversation
Contributor
Author
|
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3279
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
vkuzo
added a commit
that referenced
this pull request
Nov 3, 2025
Summary: Change the granularity for this scaling type from `PerBlock((1, 128)), PerBlock((128, 128))` to `PerBlock([1, 128]), PerBlock([128, 128])`, to get around the current limitation of config serialization not supporting tuples. Error when serializing tuples: https://gist.github.com/vkuzo/ab4d6aec83cb98ad9417898d2c024a2c Supporting tuples and lists would be a better long term fix, but the workaround will unblock further work in the short term. Test Plan: ``` pytest test/quantization/quantize_/workflows/float8/test_float8_tensor.py -s -x ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: e150e2a ghstack-comment-id: 3480842282 Pull-Request: #3279
This was referenced Nov 3, 2025
vkuzo
added a commit
that referenced
this pull request
Nov 3, 2025
Summary: Change the granularity for this scaling type from `PerBlock((1, 128)), PerBlock((128, 128))` to `PerBlock([1, 128]), PerBlock([128, 128])`, to get around the current limitation of config serialization not supporting tuples. Error when serializing tuples: https://gist.github.com/vkuzo/ab4d6aec83cb98ad9417898d2c024a2c Supporting tuples and lists would be a better long term fix, but the workaround will unblock further work in the short term. Test Plan: ``` pytest test/quantization/quantize_/workflows/float8/test_float8_tensor.py -s -x ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 68799cc ghstack-comment-id: 3480842282 Pull-Request: #3279
jerryzh168
reviewed
Nov 4, 2025
| KernelPreference.AUTO, | ||
| KernelPreference.TORCH, | ||
| ), "unimplemented" | ||
| assert self.mm_config is None, "unimplemented" |
Contributor
Author
There was a problem hiding this comment.
yes, this is tested with the serialization flow. When the object is created a default value of mm_config is set, and then when object is saved and reloaded, that value then makes it to the constructor.
jerryzh168
approved these changes
Nov 4, 2025
vkuzo
added a commit
that referenced
this pull request
Nov 6, 2025
Summary: Change the granularity for this scaling type from `PerBlock((1, 128)), PerBlock((128, 128))` to `PerBlock([1, 128]), PerBlock([128, 128])`, to get around the current limitation of config serialization not supporting tuples. Error when serializing tuples: https://gist.github.com/vkuzo/ab4d6aec83cb98ad9417898d2c024a2c Supporting tuples and lists would be a better long term fix, but the workaround will unblock further work in the short term. Test Plan: ``` pytest test/quantization/quantize_/workflows/float8/test_float8_tensor.py -s -x ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 32b5009 ghstack-comment-id: 3480842282 Pull-Request: #3279
vkuzo
added a commit
that referenced
this pull request
Nov 6, 2025
Summary: Change the granularity for this scaling type from `PerBlock((1, 128)), PerBlock((128, 128))` to `PerBlock([1, 128]), PerBlock([128, 128])`, to get around the current limitation of config serialization not supporting tuples. Error when serializing tuples: https://gist.github.com/vkuzo/ab4d6aec83cb98ad9417898d2c024a2c Supporting tuples and lists would be a better long term fix, but the workaround will unblock further work in the short term. Test Plan: ``` pytest test/quantization/quantize_/workflows/float8/test_float8_tensor.py -s -x ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 32b5009 ghstack-comment-id: 3480842282 Pull-Request: #3279
namgyu-youn
pushed a commit
to namgyu-youn/ao
that referenced
this pull request
Nov 21, 2025
* Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned] * Update [ghstack-poisoned]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Change the granularity for this scaling type from
PerBlock((1, 128)), PerBlock((128, 128))toPerBlock([1, 128]), PerBlock([128, 128]),to get around the current limitation of config serialization not
supporting tuples.
Error when serializing tuples:
https://gist.github.com/vkuzo/ab4d6aec83cb98ad9417898d2c024a2c
Supporting tuples and lists would be a better long term fix, but the
workaround will unblock further work in the short term.
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags: