pytorch
adb2b380 - [quant][graphmode][fx] qconfig_dict support more types of configurations (#44856)

Commit
4 years ago
[quant][graphmode][fx] qconfig_dict support more types of configurations (#44856) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/44856 Support following format of qconfig_dict ```python qconfig_dict = { # optional, global config "": qconfig?, # optional, used for module and function types # could also be split into module_types and function_types if we prefer "object_type": [ (nn.Conv2d, qconfig?), (F.add, qconfig?), ..., ], # optional, used for module names "module_name": [ ("foo.bar", qconfig?) ..., ], # optional, matched in order, first match takes precedence "module_name_regex": [ ("foo.*bar.*conv[0-9]+", qconfig?) ..., ] # priority (in increasing order): global, object_type, module_name_regex, module_name # qconfig == None means fusion and quantization should be skipped for anything # matching the rule } ``` Test Plan: Imported from OSS Reviewed By: vkuzo Differential Revision: D23751304 fbshipit-source-id: 5b98f4f823502b12ae2150c93019c7b229c49c50
Author
Parents
Loading