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
8329816: Add SLEEF version 3.6 #19185
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back mikael! A progress list of the required criteria for merging this PR into |
@vidmik This change is no longer ready for integration - check the PR body for details. |
Thanks for working on this. |
Looks like that change is not yet in a released version of SLEEF, and in particular not in 3.6. We do need updated approvals when we pick up new versions. Since we've gone through the process once it's typically easier/faster to do so. It will be technically easier/faster as well, now that I know how to do it and have encoded it in the createSleef.sh script. |
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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.
Is this missing line break a mistake or intended?
Thanks, I see. I'm OK to push this pr first, if it's also convenient for you, as we will need to push the change between 3.6.1/3.7 and 3.6 again when 3.6.1/3.7 is released. |
Let me suggest that we wait for the next release of SLEEF to be released in that case since that release seems to be imminent. That way we'll get both the performance fixes and we can include the RISC-V header files at the same time. Fair? |
Yes, it makes sense to me. Thanks! |
Thank you Hamlin. I'll try to keep my eyes open for the announcement of the upcoming SLEEF release but do feel free to notify me if you see it first! |
Thank you @vidmik , sure, I will do it. |
# doing something like: | ||
# | ||
# 1. cd <sleef> | ||
# 2. bash <jdk>/make/devkit/createSleef.sh aarch64-gcc.cmake <path-to>/devkit |
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.
So you'd need a different copy of sleef for each platform? The files you have put in linux/native/libvectormath
, what platform are they for? Should we not put them in a platform-specific subdirectory?
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.
So you'd need a different copy of sleef for each platform?
I think it's one or more.
The files you have put in linux/native/libvectormath, what platform are they for? Should we not put them in a platform-specific subdirectory?
we could, but not necessary, as long as they have different suffixes, and normally that suffixes indicate what platform it's for.
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.
Okay, suffix works fine too. But the files currently in the patch is named e.g. sleefinline_advsimd.h
, which does not indicate any platform at all. Is it a generic file, and the platform specific ones are still missing from this PR?
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 both sleefinline_advsimd.h
and sleefinline_sve.h
are specific for arm.
In the future, on riscv the corresponding file name will be sleefinline_rvvm1.h
.
Only misc.h
is a generic file shared among platforms.
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.
Oh, you mean that the sve
suffix signals that it is for ARM. I thought you were talking about having a name like sleefinline_aarch64.h
.
Sure, if the only files generated by sleef are ever .h files, the logic for chosing which to include can be done entirely by #ifdef
s in the source code. But if there ever needs to be different .c or .cpp files to include in the build, the build system needs to be able to determine automatically if they should be included or included, and that can only be made if the path or the file name includes the CPU moniker.
Personally, I think it would show good alignment with the prevailing norms in the JDK to also use this way of naming files for .h files. But I confess that for .h files it is more a matter of style, rather than a necessity from the build system.
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 the information. I think the files from sleef will be .h headers only. I'm also fine to align with prevailing norms in the JDK, it's always good to do so.
Just a reminder for us in the future discussion of #18605, maybe we should consider this dir or file naming norms (e.g. currently there are vector_math_sve.c and vector_math_neon.c under src/jdk.incubator.vector/linux/native/libvectormath), as there will be more files related to different platforms added in the future, e.g. riscv64.
I, too, envision that we'll be importing header files (only). That said, I'd very much prefer not to rename them as part of the import. If anything I could see us have architecture specific directories in which we place the respective files (and a common directory for |
I understand that you want to avoid renaming files, if they are imported. That is a good point. Moving them to an arch subdirectory does not seem like much additional hassle (there's apparently still a lot of manual work involved in upgrading the source from the third party upstream), and might help readers that are not deeply familiar with these platforms. But then again, if we only talk about header files, it is not strictly needed, so if you don't want to do it, then skip it. |
JDK-8312425 is looking to optimize vector math operations by leveraging the SLEEF library. For legal reasons the actual contribution of the SLEEF files needs to be handled separately. This enhancement adds the relevant files, enabling the rest of JDK-8312425 to move forward.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19185/head:pull/19185
$ git checkout pull/19185
Update a local copy of the PR:
$ git checkout pull/19185
$ git pull https://git.openjdk.org/jdk.git pull/19185/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19185
View PR using the GUI difftool:
$ git pr show -t 19185
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19185.diff
Webrev
Link to Webrev Comment