Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil-lyakhov committed Aug 14, 2024
1 parent 7ecfcb9 commit b150788
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion nncf/experimental/torch/fx/nncf_graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def get_edge_params(
if tensor_shape is None:
# TODO(dlyakhov): Refactor algorithms to always have knowns edges shapes.
nncf_logger.debug(f"Edge shape between {source_node.name} and {dist_node.name} is unknown.")
tensor_shape = None

input_port_id = dist_node.all_input_nodes.index(source_node)
return input_port_id, output_port_id, tensor_shape
10 changes: 8 additions & 2 deletions nncf/experimental/torch/fx/statistics/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,14 @@ def _get_statistic_collector_name(tp: PTTargetPoint, module_to_insert: torch.nn.
:param module_to_insert: Given statistic collection module.
:return: Unique statistic collector name according to given target point and module.
"""
tp_name = "_".join([tp.target_node_name, str(tp.input_port_id), str(tp.target_type.value)])
return f"{tp_name}_{str(id(module_to_insert))}"
return "_".join(
[
tp.target_node_name,
str(tp.input_port_id),
str(tp.target_type.value),
str(id(module_to_insert)),
]
)

def _get_transformation_layout_extra_outputs(
self, statistic_points: StatisticPointsContainer
Expand Down

0 comments on commit b150788

Please sign in to comment.