Update Convert extender (#4409)

* Update Convert extender

* Update copyright year
This commit is contained in:
Anton Chetverikov authored and GitHub committed 2021-02-19 20:50:46 +03:00
1 parent 48144860d5
commit 8c79d4134f
1 file changed
+3 -4
@@ -1,5 +1,5 @@
"""
Copyright (C) 2018-2020 Intel Corporation
Copyright (C) 2018-2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@ class Convert_extender(Extender):
def extend(op: Node):
op['dst_type'] = destination_type_to_np_data_type(op.destination_type)
# CompressQuantizeWeights generates IR with constant sub-graph, that should not be ConstFolded:
# Const(u8) -> Convert(to fp) -> FakeQuantize
# Const(u8) -> Convert(to fp) -> (some eltwise operations) -> FakeQuantize
if op.in_node().in_node().soft_get('type') == 'Const':
if op.out_node().out_node().soft_get('type') == 'FakeQuantize':
op['stop_value_propagation'] = True
op['stop_value_propagation'] = True