Skip to content

Commit

Permalink
add condition to find duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
eladc-git committed Aug 7, 2024
1 parent c70c464 commit 11de826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model_compression_toolkit/core/common/graph/base_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ def get_qco(self, tpc: TargetPlatformCapabilities) -> QuantizationConfigOptions:
# Extract qco with is_match_type to overcome mismatch of function types in TF 2.15
matching_qcos = [_qco for _type, _qco in tpc.layer2qco.items() if self.is_match_type(_type)]
if matching_qcos:
if len(matching_qcos) > 1:
if len(matching_qcos) > 1 and matching_qcos[0] != tpc.tp_model.default_qco:
Logger.error('Found duplicate qco types!')
return matching_qcos[0]
return tpc.tp_model.default_qco
Expand Down

0 comments on commit 11de826

Please sign in to comment.