Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use op.operation.name to detect funcOps in tt-explorer #2352

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vwellsTT
Copy link
Contributor

@vwellsTT vwellsTT commented Mar 3, 2025

Problem description

In previous PR, I was not properly checking for funcOps to avoid extraneous node in tt-explorer (because op.name will yield actual func name, op.operation.name will yield expected "func.func"). This is trivial fix to correct this logic, plus simplify call structure a bit based on Vraj's feedback

What's changed

Inlined one of the funcs I created, since it is only invoked once anyway + didn't add much clarity. Replaced relevant comparisons to "func.func" with op.operation.name instead of op.name

Checklist

  • New/Existing tests provide coverage for changes
  • Manually confirmed this eleminates bad nodes in tt-explorer

@vwellsTT vwellsTT changed the title properly use op.operation.name to detect funcOps in tt-explorer Use op.operation.name to detect funcOps in tt-explorer Mar 3, 2025
@@ -771,7 +738,7 @@ def process_operations(
# Second pass: create all edges
for op in operations:
# Skip module + func operations as they've been processed recursively
if is_module_op(op) or op.name == "func.func":
if is_module_op(op):
Copy link
Contributor Author

@vwellsTT vwellsTT Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was wrong before, we do want to process operands on func ops, only want to avoid emitting a node for them (which is governed by other check, not this one). Otherwise, inputs arguments don't get nodes -> missing a lot of edges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant