JDK-8341260 : Add Float16 to jdk.incubator.vector
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-09-30
  • Updated: 2025-07-15
  • Resolved: 2024-11-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24 b24Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
To allow earlier experimentation and easier use, add a Float16 type to the jdk.incubator.vector package.

This is port/move of Float16 work done in the lworld+fp16 branch of Valhalla.
Comments
Changeset: dbf23466 Branch: master Author: Joe Darcy <darcy@openjdk.org> Date: 2024-11-13 18:27:41 +0000 URL: https://git.openjdk.org/jdk/commit/dbf23466aff902836838f06bcbbf3c9e7c5e9c6a
13-11-2024

The fast-path in public static Float16 float16Value(BigDecimal bd) contained just a small error (see comment on PR)
22-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21574 Date: 2024-10-17 23:11:07 +0000
19-10-2024

The attachment JDK-8341260.2024-09-30.patch is a first attempt at a patch porting the java/lang implementation of Float16 to jdk.incubatabor.vector instead. Much of the method public static Float16 float16Value(BigDecimal bd) is commented out due to as as-of-yet unfixed bug in the fast-path code. The remaining code passes the corresponding regression tests and the performance issue can be addressed as future work. The diff file added on 2024-09-30 should the differences between the java/lang based implementation from the Valhalla lworld+fp16 branch and a port to jdk.incubator.vector in stock JDK 24 mainline.
01-10-2024