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

Get nodes that match patterns #1909

Open
jambayk opened this issue Oct 21, 2024 · 2 comments
Open

Get nodes that match patterns #1909

jambayk opened this issue Oct 21, 2024 · 2 comments
Assignees

Comments

@jambayk
Copy link

jambayk commented Oct 21, 2024

The onnx rewriter matches node patterns and replaces them. It would be a useful functionality if the node pattern matcher could be used to get the list of node groups that match patterns.
This could be used to check for existence of patterns, or the user can do things outside of the rewrite rules on the matched nodes.

@justinchuby
Copy link
Collaborator

So instead of doing the full replacement, an api to just find matches may be helpful. I was hoping to have something like that the other day too. @gramalingam

@jambayk
Copy link
Author

jambayk commented Oct 21, 2024

This is optional, but if having a generator as output might be nice too so we can do a fast check for existence of a pattern (return True if pattern exists at least once) without having to go iterator without having to go through the whole model.

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

No branches or pull requests

3 participants