Skip to content

[ROCm] Do rewrite math.fpowi - #20281

Merged
bjacob merged 1 commit into
iree-org:mainfrom
bjacob:do-rewrite-fpowi
Mar 17, 2025
Merged

bjacob merged 1 commit into
iree-org:mainfrom
bjacob:do-rewrite-fpowi

Conversation

@bjacob

@bjacob bjacob commented Mar 17, 2025

Copy link
Copy Markdown
Collaborator

When in #20222 we dropped all math rewrites on ROCm, we lost an important rewrite of math.fpowi to multiplications. This caused the regression flagged by @AmosLewis in #20222 (comment).

Signed-off-by: Benoit Jacob <[email protected]>
@bjacob
bjacob marked this pull request as ready for review March 17, 2025 18:44
@bjacob
bjacob requested a review from hanhanW as a code owner March 17, 2025 18:44
@bjacob
bjacob enabled auto-merge (squash) March 17, 2025 18:52
@bjacob
bjacob merged commit a6609e9 into iree-org:main Mar 17, 2025
bjacob added a commit that referenced this pull request Mar 18, 2025
This is a follow-up to #20281 which lacked a test, and had left the c++
logic in a state that was prone to unintentional regression. Also, this
ensures that the `math.fpowi` rewrite happens even with
`-iree-codegen-gpu-native-math-precision`, which is intentional as
`math.fpowi` is not really a math function, like the comment explains.

Signed-off-by: Benoit Jacob <[email protected]>
Eliasj42 pushed a commit that referenced this pull request Mar 24, 2025
When in #20222 we dropped all math rewrites on ROCm, we lost an
important rewrite of `math.fpowi` to multiplications. This caused the
regression flagged by @AmosLewis in
#20222 (comment).

Signed-off-by: Benoit Jacob <[email protected]>
Signed-off-by: Elias Joseph <[email protected]>
Eliasj42 pushed a commit that referenced this pull request Mar 24, 2025
This is a follow-up to #20281 which lacked a test, and had left the c++
logic in a state that was prone to unintentional regression. Also, this
ensures that the `math.fpowi` rewrite happens even with
`-iree-codegen-gpu-native-math-precision`, which is intentional as
`math.fpowi` is not really a math function, like the comment explains.

Signed-off-by: Benoit Jacob <[email protected]>
Signed-off-by: Elias Joseph <[email protected]>
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
When in #20222 we dropped all math rewrites on ROCm, we lost an
important rewrite of `math.fpowi` to multiplications. This caused the
regression flagged by @AmosLewis in
#20222 (comment).

Signed-off-by: Benoit Jacob <[email protected]>
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
This is a follow-up to #20281 which lacked a test, and had left the c++
logic in a state that was prone to unintentional regression. Also, this
ensures that the `math.fpowi` rewrite happens even with
`-iree-codegen-gpu-native-math-precision`, which is intentional as
`math.fpowi` is not really a math function, like the comment explains.

Signed-off-by: Benoit Jacob <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants