Skip to content

Commit

Permalink
Update on "[quant][graphmode][fx] Add support for additional_{fusion/…
Browse files Browse the repository at this point in the history
…quant}_pattern"

Summary:
Allow user to provide additional fusion/quant patterns for fx graph mode

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D24317437](https://our.internmc.facebook.com/intern/diff/D24317437)

[ghstack-poisoned]
  • Loading branch information
jerryzh168 committed Oct 22, 2020
2 parents 3824fc7 + 852d55c commit 4d35c6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/quantization/fx/quantize.py
Expand Up @@ -328,7 +328,7 @@ def _prepare(self, model, qconfig_dict, inplace, prepare_custom_config_dict, is_
if not inplace:
model = copy.deepcopy(model)
additional_quant_patterns = prepare_custom_config_dict.get("additional_quant_pattern", {})
self.patterns = get_default_quant_patterns.copy()
self.patterns = get_default_quant_patterns().copy()
for k, v in additional_quant_patterns.items():
self.patterns[k] = v

Expand Down

0 comments on commit 4d35c6f

Please sign in to comment.