-
Notifications
You must be signed in to change notification settings - Fork 631
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
Attach Fusion interface to linalg.softmax
#18550
Conversation
Signed-off-by: Ian Wood <[email protected]>
Signed-off-by: Ian Wood <[email protected]>
9535958
to
909f31b
Compare
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.
Are we able to add a transform op in LinalgExt and test the fusion implementation with it? This mechanism is similar to what we have in tiling. Once we have this interface being mature, we can upstream the transform op and tests to MLIR repo smoothly.
@hanhanW What do you mean by a transform op? |
I wonder if we can have testing setup like: iree/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/tiling.mlir Lines 1 to 23 in e19950c
|
I think now the testing is relying on one of the tests in https://github.com/iree-org/iree/tree/main/compiler/src/iree/compiler/DispatchCreation/test. (Please correct me if I'm wrong) In the transform op setup, we can decouple the deps between IREE and the interface better, which helps the upstream in the future. |
I see. Yes, the testing is relying on DispatchCreation's test, so that makes sense. One issue I see is that the fusion interface offers helpful information to |
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.
Could you add a test for this?
I see, then I think it is fine for now. What I'm looking for is something similar to the upstream transform-op-fuse.mlir. We don't really care about the heuristics that used in IREE, but more like functionality. I realized that we need an op that has a region to test the fusion. We could create a test op if it is in upstream, but it looks tricky in IREE. So I think it is fine for now. |
Signed-off-by: Ian Wood <[email protected]>
There are 86 softmax ops in clip (acounting for the 1225 -> 1139 decrease in dispatches), each followed by a 'bit truncate' op. This patch allows the
linalg.softmax
ops to fuse with the truncation op.