RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v29]

Srinivas Vamsi Parasa duke at openjdk.org
Tue Aug 29 17:36:22 UTC 2023


On Tue, 29 Aug 2023 16:02:57 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> If it's tied to GCC as well, then we should probably include that in the condition here unless it's also expected to work with Clang. (`TOOLCHAIN_TYPE` = `gcc`)
>
>> The reason this PR is focused on Linux is because the AVX512 sort and partitioning routines are based on Intel’s x86-simd-library (https://github.com/intel/x86-simd-sort) which was originally developed with GCC as the target compiler. Thus, this PR has restricted itself to Linux as the code was tested using GCC/Linux platforms. Additionally, the x86_64 library is compiled for AVX512 using file specific compilation pragmas (`#pragma GCC target("avx512dq", "avx512f")`). This feature is absent for Windows/MSVC++ compiler.”
> 
> That is why I am questioning this approach to have additional separate C++ code library - too much dependencies on other tools.
> 
> As I suggested before try to disassemble this library and use assembler code in VM new stubs. You can create specialized stubGenerator_x86_64_array_sort.cpp file for it. Then you don't need to depend on C++ compiler or OS.

The shared library approach is being followed currently as an initial implementation to demonstrate the value of AVX512 sorting. This will be followed up in future with support for Windows as well. 
If it is ok with you, the shared library approach could be pursued for now to be later replaced with specialized assembly stubs (which are agnostic to OS and compiler) when AVX512 sort is enabled for Windows. Please let us know.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14227#discussion_r1309151742


More information about the hotspot-compiler-dev mailing list