pytorch
91c6d2e5 - Add support for quantized operator conversion from PT to C2 via ONNX (#29694)

Commit
5 years ago
Add support for quantized operator conversion from PT to C2 via ONNX (#29694) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/29694 This PR adds preliminary support required to be able to run quantized pytorch models on a C2 backend. For quantized ops we use a custom domain name 'caffe2' to register the ops if they are in the "quantized" namespace. The change also adds JIT pass to unpack the quantized weights and insert the unpacked values into the graph. The actual tensor values are looked up from the params dict. Test Plan: python test/onnx/test_pytorch_onnx_caffe2.py TestQuantizedOps Imported from OSS Reviewed By: houseroad Differential Revision: D18467130 fbshipit-source-id: 53ebd8c43935f7d7e74305dad6c231a2247df176
Author
Parents
Loading