pytorch/torch/ao/quantization
Jesse Cai d4bd88b64b [Quant][fx] Remove WEIGHT_INDEX_DICT and BIAS_INDEX_DICT (#83263)
Summary:

This change adds in input_type_to_index mappings to the backend patterns for `nn.functional.linear`, `nn.functional.conv1d`, `nn.functional.conv1d`, and `nn.functional.conv3d`.

This let's us remove `WEIGHT_INDEX_DICT` and `BIAS_INDEX_DICT` from `prepare.py`.
Instead we pass around `backend_config` and check wether an arg is weight/bias agains that config

Test Plan:
```
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps
```
Reviewers:
@andrewor14

Subscribers:

Tasks:

Tags: quant, fx

Differential Revision: [D38705516](https://our.internmc.facebook.com/intern/diff/D38705516)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83263
Approved by: https://github.com/andrewor14
2022-08-15 14:23:22 +00:00
..
_dbr [Quant][fx][bc-breaking] Replace qconfig_dict with a config object (#78452) 2022-05-30 18:30:07 +00:00
backend_config [Quant][fx] Remove WEIGHT_INDEX_DICT and BIAS_INDEX_DICT (#83263) 2022-08-15 14:23:22 +00:00
experimental [quant] Remove unneeded lines from APoT linear (#82909) 2022-08-08 11:30:24 +00:00
fx [Quant][fx] Remove WEIGHT_INDEX_DICT and BIAS_INDEX_DICT (#83263) 2022-08-15 14:23:22 +00:00
__init__.py [Quant][fx][bc-breaking] Replace qconfig_dict with a config object (#78452) 2022-05-30 18:30:07 +00:00
_correct_bias.py
_equalize.py
_learnable_fake_quantize.py
_quantize_dbr.py [Quant][fx][bc-breaking] Replace qconfig_dict with a config object (#78452) 2022-05-30 18:30:07 +00:00
fake_quantize.py [quant][better-engineering][bc-breaking] Removed quant_min/quant_max from fake_quant modules 2022-05-11 14:23:05 +00:00
fuse_modules.py Integrate xdoctest - Rebased (#82797) 2022-08-12 02:08:01 +00:00
fuser_method_mappings.py Integrate xdoctest - Rebased (#82797) 2022-08-12 02:08:01 +00:00
observer.py Integrate xdoctest - Rebased (#82797) 2022-08-12 02:08:01 +00:00
pattern.md
qconfig_mapping_utils.py [Quant][fx][bc-breaking] Replace qconfig_dict with a config object (#78452) 2022-05-30 18:30:07 +00:00
qconfig_mapping.py [quant][fx] Follow up fixes for qconfig validations for fixedqparams ops (#81010) 2022-07-14 18:06:23 +00:00
qconfig.py [quant][fx] Follow up fixes for qconfig validations for fixedqparams ops (#81010) 2022-07-14 18:06:23 +00:00
quant_type.py [Quant][fx][bc-breaking] Replace *custom_config_dict with config objects 2022-06-16 17:50:07 +00:00
quantization_mappings.py Add prelu op and module for quantized CPU backend (#73491) 2022-07-20 07:48:15 +00:00
quantization_types.py [quant][fx] Move backend_config folder to torch.ao.quantization 2022-04-19 15:38:57 +00:00
quantize_fx.py [quant][fx] Add more detailed docs for prepare_fx/prepare_qat_fx/convert_fx (#83132) 2022-08-11 16:20:30 +00:00
quantize_jit.py
quantize.py [quant] Create default custom modules for LSTM and MHA (#79960) 2022-06-30 00:00:46 +00:00
stubs.py
utils.py [Quant][fx][bc-breaking] Replace *custom_config_dict with config objects 2022-06-16 17:50:07 +00:00