-
Notifications
You must be signed in to change notification settings - Fork 767
x86: Implement fma intrinsic #21118
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
x86: Implement fma intrinsic #21118
Conversation
Requires fma, extensions. Here are performance numbers,
|
ff7bb16
to
229e619
Compare
FYI @0xdaryl, @JamesKingdon @hzongaro Would you mind reviewing? |
Thanks Brad, what a result! |
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.
Thanks for pulling this together so quickly! I just have a few comments and questions.
See the force-push |
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.
I think the changes look good. I will wait for @0xdaryl to review before running tests.
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.
I think the logic behind choosing the best instruction format to use is sound. I just have a few issues with the approach behind that.
@hzongaro The only thing I changed is comments, but was forced to rebase and fix conflicts. I think everything is ready to run testing. |
@0xdaryl, may I ask you to confirm that your comments were all resolved to your satisfaction? |
Jenkins test sanity.functional,sanity.openjdk xlinux,win,xmac jdk11,jdk17,jdk21 |
The many jvmti test failures in JDK 11 sanity.functional xlinux and Windows appear to be unrelated to this change. I see the same failures with another pull request test run. The failures running The failures in JDK running I will rerun sanity.functional testing for JDK 11 x86-64 macOS Jenkins test sanity.functional xmac jdk11 |
@BradleyWood, it looks there are merge conflicts that you will need to resolve before I will be able to rerun the JDK 11 xmac testing. |
Signed-off-by: Bradley Wood <[email protected]>
@hzongaro Fixed conflicts |
Jenkins test sanity.functional xmac jdk11 |
@hzongaro Should I double-deliver on monday if no issues arise by then? |
I this is a safe change. I would be OK with it if there are no objections. |
I think its on the safer side as far as intrinsics go. The only concern I have is that the operands which may be loaded directly from memory could come in any of many possible combinations. I did my best to test this whilst I was working on it buy disabling a few optimizations and placing constants (such as 1f) in place of variables to force memory loads at specific spots. On the other hand, this change has survived 4 or 5 days of builds/tests without issues, provides significant performance benefits, and has a workaround option to disable the intrinsic if needed. FYI, @pshipton |
Sorry for that typo! I meant to say, "I think this is a safe change." I agree with @BradleyWood's analysis. |
Getting it in today would be good, before we start any milestone builds. |
This PR implements Math.fma intrinsics on x86 with vfmadd instructions.
Issue: #7474