On Wed, 24 Aug 2022 21:03:53 GMT, Smita Kamath <svkam...@openjdk.org> wrote:

>> 8289552: Make intrinsic conversions between bit representations of half 
>> precision values and floats
>
> Smita Kamath has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Addressed review comments, updated test cases and microbenchmark

test/jdk/java/lang/Float/Binary16ConversionNaN.java line 29:

> 27:  * @summary Verify NaN sign and significand bits are preserved across 
> conversions
> 28:  * @run main Binary16ConversionNaN
> 29:  * @run main/othervm/timeout=600 -XX:+UnlockDiagnosticVMOptions

Do we need to specify a timeout? The tests have been running fine without 
intrinsics, no timeouts reports.

test/micro/org/openjdk/bench/java/math/Fp16ConversionBenchmark.java line 73:

> 71:           f16out[i] = Float.floatToFloat16(fin[i]);
> 72:       }
> 73:       bh.consume(f16out);

You can simplify to this:

Suggestion:

  public float floatToFloat16() {
      for (int i = 0; i < fin.length; i++) {
          f16out[i] = Float.floatToFloat16(fin[i]);
      }
      return f16out;

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

PR: https://git.openjdk.org/jdk/pull/9781

Reply via email to