Equivalence Pattern Rewriter to integrate expansion of Softmax into equality saturation#5655
Open
szerdick wants to merge 87 commits intoxdslproject:jumerckx/interp_ematchfrom
Open
Equivalence Pattern Rewriter to integrate expansion of Softmax into equality saturation#5655szerdick wants to merge 87 commits intoxdslproject:jumerckx/interp_ematchfrom
szerdick wants to merge 87 commits intoxdslproject:jumerckx/interp_ematchfrom
Conversation
With the foreach approach, I believe part of this logic can be simplified/omitted, but this is a good first step.
We need to be more careful with the bindings selected by matchers. Right now, values are sometimes passed as their class result to a rewriter: ``` x = … y = … c = class x, y rewrite “myrewrite”(c) ``` This is problematic in MLIR as other rewrites can invalidate c. While we are guaranteed to not erase any operation in the “program domain”, this is not true for the operations of the “e-graph domain”. The solution is to ensure in the pdl lowering that only values from the program domain are passed to rewriters and the conversion to e-graph domain happens at the latest possible point, in the rewriter itself. (This is not an issue in xDSL because erasing an e-class does not discard of the object)
non-eqsat lowering should stay the same
(not entirely done) Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
to show how it should be done, the change would also need to be made to apply_eqsat_pdl.
e64571a to
ba97362
Compare
… interp_ematch
ab7c09d to
1077c5a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.