From 53319e60fc7e4fd9db739c768d8bba8992ad059a Mon Sep 17 00:00:00 2001 From: Liubov Talamanova Date: Tue, 6 Sep 2022 14:48:28 +0100 Subject: [PATCH] Fixed insert_fake_quantize() with empty hw_config (#12676) --- tools/pot/openvino/tools/pot/graph/passes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/pot/openvino/tools/pot/graph/passes.py b/tools/pot/openvino/tools/pot/graph/passes.py index 2400745712b..ea3e7279eab 100644 --- a/tools/pot/openvino/tools/pot/graph/passes.py +++ b/tools/pot/openvino/tools/pot/graph/passes.py @@ -872,9 +872,10 @@ def insert_fake_quantize(graph, node, ports=None, names=None, fq_types=None, hw_ fq_group = fq_type[idx] fq_configs = [] - node_type = get_hardware_config_operation_type(node, list(hw_config.keys())) - if hw_config is not None and hw_config[node_type]: - fq_configs = hw_config[node_type][fq_group] + if hw_config is not None: + node_type = get_hardware_config_operation_type(node, list(hw_config.keys())) + if hw_config[node_type]: + fq_configs = hw_config[node_type][fq_group] fq_options = { 'fq_group': fq_group,