Skip to content

Commit

Permalink
[Fix] some nodes' target is not a module.
Browse files Browse the repository at this point in the history
  • Loading branch information
fanyunqian authored and Tracin committed Apr 11, 2022
1 parent cc07b13 commit 32a70a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mqbench/prepare_by_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def duplicate_reused_nodes(graph: torch.fx.Graph, modules: Dict[str, Any] = {}):
target_dict = dict()
dup_modules = dict()
for node in graph.nodes:
if isinstance(node.target, str):
if node.op == "call_module":
if node.target not in target_dict:
target_dict[node.target] = [node]
else:
Expand Down

0 comments on commit 32a70a2

Please sign in to comment.