pytorch/torch/quantization
Vasiliy Kuznetsov d549c8de78 fx quant: enable linear-bn1d fusion for PTQ (#66484)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66484

https://github.com/pytorch/pytorch/pull/50748 added linear - bn1d fusion
in Eager mode, for PTQ only. This PR also enables this in FX graph mode.

We reuse the existing conv-bn-relu fusion handler, renaming `conv` to
`conv_or_linear` for readability.

The QAT version is saved for a future PR, for both eager and FX graph.

Test Plan:
```
python test/test_quantization.py TestFuseFx.test_fuse_linear_bn_eval
```

Imported from OSS

Reviewed By: bdhirsh

Differential Revision: D31575392

fbshipit-source-id: f69d80ef37c98cbc070099170e335e250bcdf913
2021-10-18 10:14:28 -07:00
..
fx fx quant: enable linear-bn1d fusion for PTQ (#66484) 2021-10-18 10:14:28 -07:00
__init__.py torch.ao migration: fake_quantize.py, phase 1 (#64814) 2021-09-13 15:22:28 -07:00
_numeric_suite_fx.py torch.ao migration: numeric suite, eager and fx (#64817) 2021-09-12 12:00:45 -07:00
_numeric_suite.py torch.ao migration: numeric suite, eager and fx (#64817) 2021-09-12 12:00:45 -07:00
fake_quantize.py torch.ao migration: fake_quantize.py, phase 1 (#64814) 2021-09-13 15:22:28 -07:00
fuse_modules.py [quant] AO migration of the fuse_modules.py (phase 1) (#64913) 2021-09-15 17:28:47 -07:00
fuser_method_mappings.py [quant]ao migration for quantization mappings and fuser method mappings hg mv (#64985) 2021-09-16 12:59:20 -07:00
observer.py [quant] ao migration of observer and qconfig (#64982) 2021-09-16 10:33:16 -07:00
qconfig.py [quant] ao migration of observer and qconfig (#64982) 2021-09-16 10:33:16 -07:00
quant_type.py [quant] AO migration of the quant_types.py (phase 1) (#64916) 2021-09-15 17:30:00 -07:00
quantization_mappings.py [quant]ao migration for quantization mappings and fuser method mappings hg mv (#64985) 2021-09-16 12:59:20 -07:00
quantize_fx.py [quant] AO migration of the torch/quantization/quantize_fx.py and torch/quantization/fx/* (#65033) 2021-09-22 09:29:15 -07:00
quantize_jit.py torch.ao migration: quantize_jit.py phase1 (#64860) 2021-09-13 08:41:48 -07:00
quantize.py [quant] Removing unnecessary import from torch/quantization/quantize.py (#64910) 2021-09-15 09:39:04 -07:00
stubs.py torch.ao migration: stubs.py phase 1 (#64861) 2021-09-13 08:40:29 -07:00
utils.py [quant] AO migration of the torch/quantization/utils.py (phase 1) (#64919) 2021-09-16 21:30:18 -07:00