Skip to content

Conversation

@supriyar
Copy link
Contributor

@supriyar supriyar commented Jul 16, 2019

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

Differential Revision: D16286397
Differential Version: 86603423
@pytorchbot pytorchbot added the module: internals Related to internal abstractions in c10 and ATen label Jul 16, 2019
@supriyar supriyar requested review from gchanan and jerryzh168 July 16, 2019 23:18
Differential Revision: D16286397
Differential Version: 86609834
Copy link
Contributor

@jerryzh168 jerryzh168 left a 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

supriyar added 2 commits July 16, 2019 20:58
Differential Revision: D16286397
Differential Version: 86620382
Differential Revision: D16286397
Differential Version: 86723021
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b91ab17.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 18, 2019
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
@ezyang ezyang deleted the export-D16286397 branch July 24, 2019 19:31
Tensor tensor = tensor_.to(kCPU, kDouble).contiguous();
Tensor tensor;
if (tensor_.is_quantized()) {
Tensor tensor = tensor_.dequantize().to(kCPU, kDouble).contiguous();
Copy link
Contributor

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: internals Related to internal abstractions in c10 and ATen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants