-
Notifications
You must be signed in to change notification settings - Fork 673
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
[LLVMGPU] Remove some op's polynomial approximation #19910
base: main
Are you sure you want to change the base?
Conversation
193d874
to
2c25ab8
Compare
2c25ab8
to
5368df4
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.
Looks good. Have you confirmed the numerics?
Not seeing CI complain about numerics except something is off with pow. I will wait until CI is clear. |
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.
The problem is that at the moment, this is not only dropping polynomial approximation for erf
, this is dropping promotion from f16 to f32 for all math functions. That is because that promotion is done by mlir::populateMathPolynomialApproximationPatterns
upstream, and not exposed separately from it, and the only place where we call that function is in the polynomial approximation path for erf
. I believe that to be the cause of accuracy issues currently observed when trying to drop the polynomial approximation for erf
.
This PR doesn't drop polynomial approx for erf. |
Oh, I see. |
But I mean, the whole premise of singling out Do we have a short term need for this PR? (Is it producing an improvement in a metric we're tracking) ? |
This is separate so we can wait until you resolve erf and then merge this. |
Using |
Interesting!! |
Side note: there is a standalone pass and pattern set for promoting math operations to wider types |
Except:
erf
, which is under investigation.powf
, need to also update many tests. Doing it in another PR.