-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fuse reshapes on pointwise inputs for mlir output fusion #3569
Open
pfultz2
wants to merge
24
commits into
develop
Choose a base branch
from
mlir-fuse-reshapes-pointwise
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+143
−119
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
fa341fc
Refactor
pfultz2 d945ba8
Format
pfultz2 a609302
Reverse the order
pfultz2 009086f
Merge branch 'develop' into mlir-fuse-reshapes-pointwise
pfultz2 504bf89
Fix test
pfultz2 b590499
Format
pfultz2 0fc5c5a
Merge branch 'develop' into mlir-fuse-reshapes-pointwise
pfultz2 3c363f5
Add skip parameter
pfultz2 34c7048
Format
pfultz2 d04b188
Fix more tests
pfultz2 94bb38d
Format
pfultz2 2734e74
Fix last test
pfultz2 301a68e
Format
pfultz2 f5240a1
Remove skip parameter
pfultz2 b5ef8f9
Add test for reshape fusion
pfultz2 802268e
Format
pfultz2 d7a4cd8
Update reshaper names
pfultz2 5d5f213
Format
pfultz2 0ef4e55
Merge branch 'develop' into mlir-fuse-reshapes-pointwise
pfultz2 b2d9a2a
Fix tidy warning
pfultz2 99100d2
Format
pfultz2 1fe5c5a
Fix cppcheck issues
pfultz2 97a6db8
Merge branch 'develop' into mlir-fuse-reshapes-pointwise
causten b1579ea
Merge branch 'develop' into mlir-fuse-reshapes-pointwise
causten File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be tangential to this PR, but what happens if one of the reshape ops has multi outputs? ie. something like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The loop below checks that all the reshapes between dot and pointwise have only one output, and it will output both if any reshape is used more than once. For the aux inputs to pointwise, it doesnt really matter:
After mlir fusion it just becomes:
DCE wont remove the
reshape
since its used, and the duplicatedreshape
doesnt really matter since it is potentially an aliasing-like operator.