Skip to content

Commit

Permalink
Print overload name in print_ops_info (#5404)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #5404

As titled. This is helpful when the aten ops have many overloads, e.g. `aten.mean.out` or `aten.mean.dim_out`

Reviewed By: dulinriley

Differential Revision: D62786631

fbshipit-source-id: d5351aa5729385225d8348baa9aef1eb998153f6
  • Loading branch information
mcremon-meta authored and facebook-github-bot committed Sep 17, 2024
1 parent fe53daf commit 0658dce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backends/cadence/aot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ def get_ops_count(graph_module: torch.fx.GraphModule) -> Dict[str, int]:
):
continue
# If the op is already present, increment the count
if get_edge_overload_packet(node.target).__name__ in freq:
freq[get_edge_overload_packet(node.target).__name__] += 1
if node.target._name in freq:
freq[node.target._name] += 1
# else, add a new entry
else:
freq[get_edge_overload_packet(node.target).__name__] = 1
freq[node.target._name] = 1
return freq


Expand Down

0 comments on commit 0658dce

Please sign in to comment.