-
Notifications
You must be signed in to change notification settings - Fork 647
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 transposition with linalg_ext.scatter
#19091
Comments
I was playing around with this a bit... This is possible with some tweaks, but need to figure out these two issues
Lets say we fix the issue and do something like this
This gets fused, but only under aggressive fusion. So compiling this with @IanWood1 to start with maybe move scatter fusion out of aggressive fusion. As a side maybe we should just try turning aggressive fusion on by default and see where we stand. |
Here's a summary here of the changes we found were needed for scatter fusion. I have attached an example scatter. To simplify the explanation, I'll refer to the to the For clarity, the
%85 = iree_linalg_ext.scatter dimension_map = [0] unique_indices(true)
ins(%update, %indicies : tensor<?x1x16x8x128xf16>, tensor<?x1xi32>)
outs(%output: tensor<?x16x8x128xf16>)
{...} Required Changes:(1) probably makes sense to add to 1) Drop the unit dimensions from "slice" portion of the
|
Update: I opened 2 PRs. The first PR #19560 makes changes to |
This change adds patterns to drop the unit dims of a `iree_linalg_ext.scatter`'s `%updates` tensor. It only drops the leading unit dimensions from the portion of `updates` that represents the indexed dimensions. See the main issue #19091 --------- Signed-off-by: Ian Wood <[email protected]>
Implements fusion with reshapes by expansion for `LinalgExt::ScatterOp`. See main issue #19091 --------- Signed-off-by: Ian Wood <[email protected]>
Sample IR shown below produces two dispatches. For
linalg_ext.scatter
we need to support fusion with transposition and collapse / expand. We do this asarg0
could be created via a concatenation of contiguous memory.The text was updated successfully, but these errors were encountered: