-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Add support to print QTensor in cpp #22950
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
Conversation
Differential Revision: D16286397 Differential Version: 86603423
Differential Revision: D16286397 Differential Version: 86609834
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.
accepted with one nit request, Thanks
Differential Revision: D16286397 Differential Version: 86620382
Differential Revision: D16286397 Differential Version: 86723021
|
This pull request has been merged in b91ab17. |
Summary: Pull Request resolved: pytorch/pytorch#22950 Print quantized tensor by first dequantizing it and then printing. Also print the scale, zero_point. size and type of tensor. Reviewed By: jerryzh168 Differential Revision: D16286397 fbshipit-source-id: 2d6fb1796e5b329a77c022b18af0a39f6edde0d7
| Tensor tensor = tensor_.to(kCPU, kDouble).contiguous(); | ||
| Tensor tensor; | ||
| if (tensor_.is_quantized()) { | ||
| Tensor tensor = tensor_.dequantize().to(kCPU, kDouble).contiguous(); |
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.
I hit this bug today. so we have never actually printed a quantized Tensor before...
Stack:
:black_circle: #22950 Add support to print QTensor in cpp 💚
Print quantized tensor by first dequantizing it and then printing. Also print the scale, zero_point. size and type of tensor.
Differential Revision: D16286397