Skip to content

Commit

Permalink
Pattern IR cleanup (#1475)
Browse files Browse the repository at this point in the history
Continuation of the pattern cleanup. End goal is to have a small
standalone pattern IR, and separate the matching algorithm (and other
utilities like 'commute') out of the IR, allowing same IR to be used by
different matching algorithms, which is yet to be done. This PR

* Simplifies the core pattern constructs (primitives, used to match
against strings, as well as attribute-patterns).
* Removes names from primitives, attribute-patterns can have optional
name used for binding in a match.
* Introduce GraphPattern

TODO:
* And other fields (like `nodes`) to GraphPattern (used by multi-output
matcher, not single-output matcher).
* Introduce pattern-builder object as parameter to function constructing
target-graph-pattern
* Reimplement commutes() externally (fixing a bug that exists there).
* Support for tensor constants, as well as approximate-equality
comparison for floats. (Switching defaults here.)

---------

Co-authored-by: Justin Chu <[email protected]>
  • Loading branch information
gramalingam and justinchuby authored May 2, 2024
1 parent b81a38a commit a722e60
Showing 1 changed file with 202 additions and 288 deletions.
Loading

0 comments on commit a722e60

Please sign in to comment.