RFR: 8341260: Add Float16 to jdk.incubator.vector [v6]
Paul Sandoz
psandoz at openjdk.org
Wed Oct 23 17:07:07 UTC 2024
On Wed, 23 Oct 2024 15:46:31 GMT, Joe Darcy <darcy at openjdk.org> wrote:
>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float16.java line 865:
>>
>>> 863: public static Float16 min(Float16 a, Float16 b) {
>>> 864: return shortBitsToFloat16(floatToFloat16(Math.min(a.floatValue(),
>>> 865: b.floatValue()) ));
>>
>> I assume we will optimize these min/max implementations in the future. Otherwise, the extra space should be removed.
>
> The general intention is that the back-end intrinsification efforts that use native hardware instructions, where present, will provide the main speed boost. Therefore, the preference has been to keep the Java sources in Float16 as straightforward and "obviously correct" as possible.
Yes, C2 optimizations and hardware instruction generation using intrinsics and other means where needed will follow in one or more subsequent PRs, where the auto-vectorizer and Vector API can utilize a common backend.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21574#discussion_r1813197718
More information about the core-libs-dev
mailing list