Repository navigation
Conversation
…rs (pytorch#199497) It currently overestimates the required memory when multiple values are packed into a single byte. E.g. for quint4x2: > TestQuantizeEagerPTQStatic::test_quantized_embedding_bag - RuntimeError: Tensor: sizes 10 12, strides 12 1, storage offset 0 and itemsize 1 require a storage of at least 120 bytes, but storage only has 60 bytes This can be reproduced using - python test_quantization.py TestQuantizeEagerPTQStatic.test_quantized_embedding - python test_quantization.py TestQuantizeEagerPTQStatic.test_quantized_embedding_bag and possibly others. I'm wondering why this isn't caught by CI at all. Only guard seems AVX2 for FBGEMM It might make sense to fold this calculation into `computeStorageNbytes` (pass data_type instead of item_size) but that change felt too large and I focused on fixing the immediate bug (cherry picked from pytorch#199497 at d4048dc, squashed; the PR is not merged upstream yet) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
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.
Linked issue or supporting maintainer
Cherry-pick of pytorch#199497 (by @Flamefire), which is not merged upstream yet. This draft exists for early testing; it should be re-picked from the merged upstream commit before it is marked ready.
BC-breaking?
No
Summary (human written only)
Agent details (AI-generated)
🤖 Generated with Claude Code