insert_quant_dequant jit pass (#24426)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/24426
Added following pass:
- _jit_pass_insert_quant_dequant: removes observer modules and calls, insert
quantize_linear-int_repr-_dequantize_linear calls for activation, weight and bias,
the scale of bias is calculated from the scale of input activation and weight
Test Plan:
python test/test_jit.py
Imported from OSS
Differential Revision: D17001141
fbshipit-source-id: e81faac697a9c0df862adc5aa8ca2aa9e4ae5fd9