-
Notifications
You must be signed in to change notification settings - Fork 663
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
[DispatchCreation] Make truncate operations fuse with producers. #19847
base: main
Are you sure you want to change the base?
[DispatchCreation] Make truncate operations fuse with producers. #19847
Conversation
2ced301
to
cebecc1
Compare
https://gist.github.com/IanWood1/0aceb30d6fc0a5a99ccca68e9eac6cba from fp16 unet is still a problem, and takes 2ms (~500ms total) when it should be in the single digit microsecond range Edit: for some reason this change is causing more horizontal fusion to kick in leading to this bad dispatch |
6d767f6
to
2dbb8a5
Compare
Could you file an issue for the changed dispatch. @nirvedhmeshram can you help fixing that |
The layout is pretty bad for this dispatch it is (M,K) * (B, N, K) -> (B, M, N). I can explore if we can improve perf for this, or should we be trying to make this (B,M,K) * (N, K) -> (B, M, N) followed by a transpose to make that (B, N, M) before dispatch creation? |
Why is |
I figured we would rather have the batch dimension on the lhs, rather than the the rhs, but you are right it shouldnt matter. Let me dig deeper if its just something in our default config. |
Currently this going though tile-and-fuse vectorize path, I even relaxed the limit of 4 we have to classify as matvec and it still gave
|
Sorry I made a bug in relaxing this, when done correctly we get, |
… to same trunc operator. Currently the fusion does not always fuse truncates with its producers (that is being fixed in iree-org#19847), but without that the truncate operators could be the same. Allow horizontal fusion to work with that case. Signed-off-by: MaheshRavishankar <mahesh.ravishankar@gmail.com>
@nirvedhmeshram could you ping me when you have a branch, I want to bench that change + re-enable horizontal fusion. |
@IanWood1 PR is ready #19857 you need the flag |
a14525e
to
9210919
Compare
Signed-off-by: MaheshRavishankar <mravisha@amd.com>
Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
9210919
to
fbbeaf4
Compare
No description provided.