pytorch
08fb13db - [Quant] Add lowering for pixel_unshuffle/narrow (#96160)

Commit
1 year ago
[Quant] Add lowering for pixel_unshuffle/narrow (#96160) Summary: ## Summary torch.nn.functional.pixel_unshuffle and torch.narrow accepts both float and quantized inputs. However, previously we would unnecessarily dequantize quantized inputs into floats before passing them to the function. This commit fixes this by lowering the pattern [dequant - pixel_unshuffle - quant]. [dequant - narrow - quant]. Test Plan: ``` python test/test_quantization.py TestQuantizeFxOps.test_pixel_unshuffle ``` ``` python test/test_quantization.py TestQuantizeFxOps.test_narrow ``` Differential Revision: D43858199 Pull Request resolved: https://github.com/pytorch/pytorch/pull/96160 Approved by: https://github.com/andrewor14
Author
Committer
Parents
Loading