Skip to content
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

Add special handling for attribute descriptors of QuantizedTensorBase #3519

Merged

Conversation

quic-kyunggeu
Copy link
Contributor

@quic-kyunggeu quic-kyunggeu commented Nov 20, 2024

Problem Statement

There is a minor quirk in PyTorch which makes tree_map(lambda x: x, torch.Size([10, 10])) return (10, 10), not torch.Size([10, 10]).
This in turn makes qtensor.shape return a plain tuple, not a torch.Size object

Main Changes

Added special handling for attribute descriptors of QuantizedTensorBase.
Now qtensor.shape will return torch.Size object, not a plain tuple.

Signed-off-by: Kyunggeun Lee <quic_kyunggeu@quicinc.com>
@quic-kyunggeu quic-kyunggeu merged commit d6fb17b into quic:develop Nov 20, 2024
4 checks passed
@quic-kyunggeu quic-kyunggeu deleted the qtensor_attr_descriptor_bugfix branch November 20, 2024 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants