pytorch/torch/ao/quantization
Jerry Zhang 1b51d29b66 [quant][pt2e] Enable constant folding for quantize ops (#109343)
Summary:
This PR added constant folding for quantize ops so that instead of storing fp32 weight in the
quantized model, we'll get int8/int16 etc. weight

Test Plan:
python test/test_quantization.py TestQuantizePT2E.test_fold_quantize

also will verify in executorch later

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D49399210](https://our.internmc.facebook.com/intern/diff/D49399210)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109343
Approved by: https://github.com/kimishpatel, https://github.com/jgong5
2023-09-27 06:04:45 +00:00
..
backend_config [quant][executorch] Support inception_v4 in examples (#108382) 2023-09-08 17:39:31 +00:00
experimental [BE] Enable ruff's UP rules and autoformat ao/ (#105430) 2023-07-19 13:44:37 +00:00
fx [quant][pt2e] Support int16 quantization (#108453) 2023-09-06 19:31:20 +00:00
pt2e [quant][pt2e] Enable constant folding for quantize ops (#109343) 2023-09-27 06:04:45 +00:00
quantizer [quant][pt2e] Enable constant folding for quantize ops (#109343) 2023-09-27 06:04:45 +00:00
__init__.py [quant][pt2] Fix and rename move_model_to_eval (#108891) 2023-09-11 15:37:01 +00:00
_correct_bias.py [BE] [2/3] Rewrite super() calls in functorch and torch (#94588) 2023-02-10 21:16:33 +00:00
_equalize.py Fix typos under torch/ao directory (#97679) 2023-04-10 22:25:15 +00:00
_learnable_fake_quantize.py [BE] Enable ruff's UP rules and autoformat ao/ (#105430) 2023-07-19 13:44:37 +00:00
fake_quantize.py [BE] Enable ruff's UP rules and autoformat ao/ (#105430) 2023-07-19 13:44:37 +00:00
fuse_modules.py [BE]: Update Ruff to 0.0.280 (#105724) 2023-07-22 23:03:34 +00:00
fuser_method_mappings.py [BE] Enable ruff's UP rules and autoformat ao/ (#105430) 2023-07-19 13:44:37 +00:00
observer.py Back out "[PyPer][BE] Fix test_scripted_module in StatCollector" (#108588) 2023-09-08 14:33:58 +00:00
pattern.md [quant][refactor] Move pattern type definition to ao/quantization/utils.py (#68769) 2021-12-07 11:00:22 -08:00
qconfig_mapping.py [ao] fixing quantized prelu workflow (#103455) 2023-06-23 16:45:40 +00:00
qconfig.py [BE] Enable ruff's UP rules and autoformat ao/ (#105430) 2023-07-19 13:44:37 +00:00
quant_type.py [BE] Enable ruff's UP rules and autoformat ao/ (#105430) 2023-07-19 13:44:37 +00:00
quantization_mappings.py [BE] Enable ruff's UP rules and autoformat ao/ (#105430) 2023-07-19 13:44:37 +00:00
quantize_fx.py [quant][fx] Fix docs for prepare_fx/prepare_qat_fx (#105979) 2023-07-26 09:56:18 +00:00
quantize_jit.py Fix typos under torch/ao directory (#97679) 2023-04-10 22:25:15 +00:00
quantize_pt2e.py [quant][pt2e] Enable constant folding for quantize ops (#109343) 2023-09-27 06:04:45 +00:00
quantize.py [ao] Support Subclasses of FloatFunctional in eager mode prepare (#109646) 2023-09-20 08:09:55 +00:00
stubs.py [codemod] Replace hasattr with getattr in caffe2/torch/ao/quantization/stubs.py (#100597) 2023-05-04 16:36:23 +00:00
utils.py [quant][pt2e] Support int16 quantization (#108453) 2023-09-06 19:31:20 +00:00