mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/59605 Enables targeting of individual function invocations by execution order. For example, given a module such as ``` class M1(torch.nn.Module): def forward(self, x): x = torch.add(x, x) x = torch.add(x, x) return x class M2(torch.nn.Module): def __init__(self): self.m1 = M1() def forward(self, x): x = self.m1(x) return x ``` We can now target the first add of `m1` with ``` qconfig_dict = { "module_name_function_order": ("m1", torch.add, 0, custom_qconfig), } ``` Test Plan: ``` python test/test_quantization.py TestQuantizeFx.test_qconfig_module_name_function_order ``` Imported from OSS Reviewed By: hx89 Differential Revision: D28951077 fbshipit-source-id: 311d423724a31193d4fa4bbf3a712b46464b5a29 |
||
|---|---|---|
| .. | ||
| fx | ||
| ns | ||
| __init__.py | ||
| _correct_bias.py | ||
| _equalize.py | ||
| _learnable_fake_quantize.py | ||
| _numeric_suite_fx.py | ||
| _numeric_suite.py | ||
| fake_quantize.py | ||
| fuse_modules.py | ||
| fuser_method_mappings.py | ||
| observer.py | ||
| qconfig.py | ||
| quant_type.py | ||
| quantization_mappings.py | ||
| quantize_fx.py | ||
| quantize_jit.py | ||
| quantize.py | ||
| stubs.py | ||
| utils.py | ||