Skip to content

Commit

Permalink
Use target name instead of node name as function name (apache#16690)
Browse files Browse the repository at this point in the history
torch change the description of the graph, function name isn't same as node name, cause can't find function. So use target name instead of node name.
  • Loading branch information
sunzj authored and Lunderberg committed Mar 12, 2024
1 parent f05bb50 commit d99d1be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/tvm/relax/frontend/torch/fx_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@ def from_fx(
), f"Unsupported module type {type(module)}"
self.env[node] = self.convert_map[type(module)](node)
elif node.op == "call_function":
func_name = node.name.rstrip("0123456789_")
func_name = node.target.__name__
assert (
func_name in self.convert_map
), f"Unsupported function type {func_name}"
Expand Down

0 comments on commit d99d1be

Please sign in to comment.