-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8353686: Optimize Math.cbrt for x86 64 bit platforms #24470
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
Conversation
|
👋 Welcome back missa-prime! A progress list of the required criteria for merging this PR into |
|
@missa-prime This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 492 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@sviswa7, @jatin-bhateja) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
@missa-prime The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
459f24c to
d1a152d
Compare
d1a152d to
30c48cb
Compare
Webrevs
|
|
What are the monotonicity and accuracy results for this approximation? Is it correctly rounded or faithfully rounded? |
How should we run that benchmark? Thanks. |
|
|
vamsi-parasa
left a comment
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.
This PR looks good to me. I independently ran the correctness tests and performance benchmarks.
Thanks,
Vamsi
…brt stub generator instructions
sviswa7
left a comment
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 to me.
|
@missa-prime |
|
/integrate |
|
@missa-prime |
|
/sponsor |
|
Going to push as commit 0df8c96.
Your commit was automatically rebased without conflicts. |
|
@sviswa7 @missa-prime Pushed as commit 0df8c96. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
|
@missa-prime The patch looks reasonable. It would have been nice if we (from Oracle) could have tested it before integration, especially this close to RDP1 for JDK25. Just for next time. If there are issues with it now, you risk that it gets backed out, and you have to redo it, and it does not make it into JDK25. |
|
This change also broke most of the non-x86 platforms, due to the new intrinsic not being implemented on those platforms. |
When you say "most of the non-x86 platforms", are you referring to the ones with processor types listed below?
I don't see a cbrt intrinsic implementation in the non-x86 platforms. However, the ones listed above appear to get to the ShouldNotReachHere error state if a particular intrinsic isn't found in |
Yes - 3 of the 5 non-x86 platforms.
I was wondering why Aarch64 didn't fail. I guess the other platforms may use this to detect new intrinsics being added. |
The arm, ppc, and s390 breaks are resolved by #25568. |
The goal of this PR is to implement an x86_64 intrinsic for java.lang.Math.cbrt() using libm. There is a new set of micro-benchmarks are included to check the performance of specific input value ranges to help prevent regressions in the future.
The command to run all range specific micro-benchmarks is posted below.
make test TEST="micro:CbrtPerf.CbrtPerfRanges"The results of all tests posted below were captured with an Intel® Xeon 6761P using OpenJDK v25-b21 as the baseline version.
For performance data collected with the new built in range micro-benchmark, see the table below. Each result is the mean of 8 individual runs, and the input ranges used match those from the original Java implementation. Overall, the intrinsic provides a major uplift of 169% when very small inputs are used and a more modest uplift of 45% for all other inputs.
Finally, the
jtreg:test/jdk/java/lang/Math/CubeRootTests.javatest passed with the changes.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24470/head:pull/24470$ git checkout pull/24470Update a local copy of the PR:
$ git checkout pull/24470$ git pull https://git.openjdk.org/jdk.git pull/24470/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24470View PR using the GUI difftool:
$ git pr show -t 24470Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24470.diff
Using Webrev
Link to Webrev Comment