Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
irenaby committed Jan 12, 2025
1 parent 8251863 commit 1036c10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions model_compression_toolkit/core/common/graph/base_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ def get_weights_configurable_nodes(self,
potential_conf_nodes = [n for n in list(self) if fw_info.is_kernel_op(n.type)]

def is_configurable(n):
kernel_attr = fw_info.get_kernel_op_attributes(n.type)[0]
return n.is_configurable_weight(kernel_attr) and (not n.reuse or include_reused_nodes)
kernel_attrs = fw_info.get_kernel_op_attributes(n.type)
return any(n.is_configurable_weight(attr) for attr in kernel_attrs) and (not n.reuse or include_reused_nodes)

return [n for n in potential_conf_nodes if is_configurable(n)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def _get_target_weight_nodes(self,
configurable = self.graph.get_weights_configurable_nodes(self.fw_info, include_reused_nodes=include_reused)
nodes = [n for n in quantized if n not in configurable]
elif target_criterion == TargetInclusionCriterion.Any:
nodes = self.graph.nodes
nodes = list(self.graph.nodes)
else:
raise ValueError(f'Unknown {target_criterion}.')

Expand Down

0 comments on commit 1036c10

Please sign in to comment.