pytorch
0e7af36a - Make bundled inputs work with quantized zero inputs (#47407)

Commit
3 years ago
Make bundled inputs work with quantized zero inputs (#47407) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/47407 Previously, the code for bundling contiguous single-valued tensors (like torch.zeros) wasn't working for quantized tensors because it was calling the `torch.tensor` constructor without passing in the quantizer. Instead, skip the constructor entirely, which makes this use case work and also simplifies the code. (Originally, I forgot that `arg.flatten()[0]` would return a tensor, not a scalar.) Test Plan: Bundled a quantized zero input and saw it run properly. Reviewed By: dhruvbird Differential Revision: D24752890 Pulled By: dreiss fbshipit-source-id: 26bc4873a71dd44660cc0fcb74c227b754e31663
Author
Parents
Loading