pytorch/torch/ao/quantization
Xia, Weiwen 3b0cd9b542 [Quant][PT2E] add a lowering pass for x86 backend (#149708)
**Summary**
This PR adds a lowering pass for x86 backend
- Patterns of `dequantize -> conv/linear (-> quantize)` are fused to corresponding quantized onednn ops.
- Weights are prepacked ahead of time.
- Post ops of conv/linear are fused if supported.
- The pass returns a `GraphModule` with the modifications mentioned above.

**Test plan**
```
pytest test/quantization/pt2e/test_x86inductor_quantizer.py -k test_lowering_to_x86
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/149708
Approved by: https://github.com/jerryzh168, https://github.com/leslie-fang-intel
2025-04-01 17:32:41 +00:00
..
backend_config PEP585 update - torch/ao/quantization (#145140) 2025-01-19 10:20:00 +00:00
experimental PEP585 update - torch/ao/quantization (#145140) 2025-01-19 10:20:00 +00:00
fx [BE]: Apply ruff PERF403 to use dict comprehensions more often (#149257) 2025-03-18 00:46:07 +00:00
pt2e [Quant][PT2E] add a lowering pass for x86 backend (#149708) 2025-04-01 17:32:41 +00:00
quantizer [Intel GPU] qlinear_pointwise.binary[_tensor] XPU support (#135337) 2025-02-21 02:09:28 +00:00
__init__.py PEP585: More UP006 fixes (#146392) 2025-02-20 06:18:13 +00:00
_correct_bias.py [BE]: Apply ruff PERF403 to use dict comprehensions more often (#149257) 2025-03-18 00:46:07 +00:00
_equalize.py [BE][Ez]: Use itertools.chain.from_iterable when possible (#148190) 2025-03-06 20:37:06 +00:00
_learnable_fake_quantize.py PEP585 update - torch/ao/quantization (#145140) 2025-01-19 10:20:00 +00:00
fake_quantize.py Migrate from Tuple -> tuple in torch/ao (#144265) 2025-01-10 00:12:06 +00:00
fuse_modules.py PEP585 update - torch/ao/quantization (#145140) 2025-01-19 10:20:00 +00:00
fuser_method_mappings.py PEP585 update - torch/ao/quantization (#145140) 2025-01-19 10:20:00 +00:00
observer.py PEP585 update - torch/ao/quantization (#145140) 2025-01-19 10:20:00 +00:00
pattern.md
qconfig_mapping.py PEP585 update - torch/ao/quantization (#145140) 2025-01-19 10:20:00 +00:00
qconfig.py [BE]: Enable ruff SLOT checks (#146276) 2025-02-04 19:18:23 +00:00
quant_type.py [BE] enable UFMT for torch/ao/quantization/ (#128863) 2024-07-25 04:17:54 +00:00
quantization_mappings.py [FIX] remove the duplicate key in DEFAULT_STATIC_QUANT_MODULE_MAPPINGS (#149043) 2025-03-13 12:42:33 +00:00
quantize_fx.py PEP585 update - torch/ao/quantization (#145140) 2025-01-19 10:20:00 +00:00
quantize_jit.py [BE] enable UFMT for torch/ao/quantization/ (#128863) 2024-07-25 04:17:54 +00:00
quantize_pt2e.py patch for block-wise quantization + pt2e (#146946) 2025-02-18 01:15:26 +00:00
quantize.py Handle meta tensors in FX quantization (#144726) 2025-01-15 16:49:43 +00:00
stubs.py [BE] enable UFMT for torch/ao/quantization/ (#128863) 2024-07-25 04:17:54 +00:00
utils.py PEP585 update - torch/ao/quantization (#145140) 2025-01-19 10:20:00 +00:00