pytorch
e67b5810 - Enable lowering to inductor (#96927)

Commit
1 year ago
Enable lowering to inductor (#96927) **Summary** Enable the lowering path from a quantized 2.0 fx graph into Inductor. The basic usage will be ``` export_module, guards = torchdynamo.export(m, *args) prepare_module = prepare_pt2e(export_module, *args) convert_module = convert_pt2e(prepare_module) ooptimized_module = compile_fx(convert_module, example_inputs) ``` Most of the issues we met previously has already been fixed in PyTorch Master. So in this PR, we mainly do 2 things: 1. Add the basic usage into a UT. 2. Move `handle_dynamo_export_graph` before the fusion passes, otherwise the dynamo_export_graph will hit the fusion passes twice which is un-expected. **Test Plan** ``` clear && python -m pytest test_quantization.py -k test_inductor_backend_config_conv ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/96927 Approved by: https://github.com/jgong5, https://github.com/EikanWang, https://github.com/jansel, https://github.com/jerryzh168
Committer
Parents
Loading