ROCm / rocMLIR

128 stars 40 forks source link

[Attention] Fixed preSoftmaxElementwiseRegion input ordering #1615

Closed manupak closed 2 months ago

manupak commented 2 months ago

Currently, there were two (wrong) assumptions: 1) elementwise ops at most have two inputs 2) preSoftmax elementwise regions have gemm input as the first

The above get violated when migraphx provides a ternary elementwise ops (such as where) and it also had the case where gemm input is in the middle.

Therefore, this commit fixes all that. closes: https://github.com/ROCm/rocMLIR-internal/issues/1575

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 61.22449% with 19 lines in your changes missing coverage. Please review.

Project coverage is 77.79%. Comparing base (bf54ae9) to head (d4ca53a). Report is 8 commits behind head on develop.

Files Patch % Lines
mlir/lib/Conversion/TosaToRock/TosaToRock.cpp 68.29% 3 Missing and 10 partials :warning:
...ialect/Rock/Transforms/GridwiseGemmToBlockwise.cpp 0.00% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1615 +/- ## =========================================== + Coverage 77.67% 77.79% +0.12% =========================================== Files 95 95 Lines 25746 25782 +36 Branches 3628 3637 +9 =========================================== + Hits 19997 20056 +59 + Misses 4287 4263 -24 - Partials 1462 1463 +1 ``` | [Flag](https://app.codecov.io/gh/ROCm/rocMLIR/pull/1615/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ROCm) | Coverage Δ | | |---|---|---| | [mfma](https://app.codecov.io/gh/ROCm/rocMLIR/pull/1615/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ROCm) | `77.79% <61.22%> (+0.12%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ROCm#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

krzysz00 commented 2 months ago

... in post-PR realizations, that std::string call for the tabs is os.indent() and os.unindent(), I think