[quant][graphmode][api] Add backend_config_dict to prepare_fx api (#64135)
authorJerry Zhang <jerryzh@fb.com>
Wed, 1 Sep 2021 21:56:14 +0000 (14:56 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 1 Sep 2021 22:32:47 +0000 (15:32 -0700)
commit7ffcf1550374af29f5b3ce316d4e576423945be0
tree3fe4ace955f7f060d77bff2771feb05233fdfc86
parent93bc03622eebb0bab4a79511c61e73b7315bf961
[quant][graphmode][api] Add backend_config_dict to prepare_fx api (#64135)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/64135

We want to start aligning the api with the design in https://github.com/pytorch/pytorch/wiki/Extending-PyTorch-Quantization-to-Custom-Backends

We plan to gradually move things from `prepare_custom_config_dict` and `convert_custom_config_dict`
to `backend_config_dict` and allow custom backend developer to define their own way of quantizing operators.

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Imported from OSS

Reviewed By: zou3519

Differential Revision: D30699456

fbshipit-source-id: e3c068da8d3da2270f57719f7159cc71cafa8598
torch/quantization/fx/prepare.py
torch/quantization/quantize_fx.py