RFR: 8353786: Migrate Vector API math library support to FFM API [v5]
Vladimir Ivanov
vlivanov at openjdk.org
Wed Apr 16 18:28:52 UTC 2025
On Wed, 16 Apr 2025 02:11:09 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>> Vladimir Ivanov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 19 additional commits since the last revision:
>>
>> - Merge branch 'master' into vector.math.01.java
>> - RVV and SVE adjustments
>> - Merge branch 'master' into vector.math.01.java
>> - Fix windows-aarch64 build failure
>> - features_string -> cpu_info_string
>> - Reviews and Float64Vector-related fix
>> - Misc fixes and cleanups
>> - CPU features support
>> - Cleanup
>> - TODO list
>> - ... and 9 more: https://git.openjdk.org/jdk/compare/e269cc66...0ffed12f
>
> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMathLibrary.java line 240:
>
>> 238: if (isAARCH64() && vspecies.vectorBitSize() > 128) {
>> 239: return false; // FIXME: SVE support only for MAX shapes
>> 240: }
>
> SVE also supports operations for partial vector size, which means the vector size is smaller than MAX size. For example, if the max vector size of a SVE architecture is 512-bit, the FP vector operations with `VectorShape.S_256_BIT` are also supported. They are implemented with the same scalable math functions in SLEEF.
>
> Hence, I think this check and the assertion in line-198 can be removed. Thanks!
How does it work now? The code in `generate_vector_math_stubs()` in `stubGenerator_aarch64.cpp` only populates `VEC_SIZE_SCALABLE` shapes with SVE versions.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24462#discussion_r2047489059
More information about the core-libs-dev
mailing list