RFR: 8318227: RISC-V: C2 ConvHF2F [v3]

Hamlin Li mli at openjdk.org
Wed Nov 29 11:15:23 UTC 2023


> Hi,
> Can you review the patch to add ConvHF2F intrinsic to JDK for riscv?
> Thanks!
> 
> (By latest kernel patch, `#define		RISCV_HWPROBE_EXT_ZFH		(1 << 27)`
> https://lore.kernel.org/lkml/20231114141256.126749-11-cleger@rivosinc.com/)
> 
> ## Test
> ### Functionality
> #### hotspot tests
> test/hotspot/jtreg/compiler/intrinsics/ 
> test/hotspot/jtreg/compiler/c2/irTests
> 
> #### jdk tests
> test/jdk/java/lang/Float/Binary16Conversion*.java
> 
> ### Performance
> tested on licheepi.
> 
> #### with UseZfh enabled & stub out-of-band
> 
> Benchmark                                     (size)  Mode  Cnt      Score     Error  Units
> Fp16ConversionBenchmark.float16ToFloat          2048  avgt   10   3493.376 ?  18.631  ns/op
> Fp16ConversionBenchmark.float16ToFloatMemory    2048  avgt   10     19.819 ?   0.193  ns/op
> 
> 
> #### with UseZfh enabled only
> (i.e. enable the intrinsic)
> 
> Benchmark                                     (size)  Mode  Cnt      Score     Error  Units
> Fp16ConversionBenchmark.float16ToFloat          2048  avgt   10   4659.796 ?  13.262  ns/op
> Fp16ConversionBenchmark.float16ToFloatMemory    2048  avgt   10     22.957 ?   0.098  ns/op
> 
> 
> #### with UseZfh disabled
> (i.e. disable the intrinsic)
> 
> Benchmark                                     (size)  Mode  Cnt      Score    Error  Units
> Fp16ConversionBenchmark.float16ToFloat          2048  avgt   10  22930.591 ? 72.595  ns/op
> Fp16ConversionBenchmark.float16ToFloatMemory    2048  avgt   10     25.970 ?  0.063  ns/op

Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:

  Fix pipeline cost in ad; Add comments

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16802/files
  - new: https://git.openjdk.org/jdk/pull/16802/files/db50b68a..2872b076

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16802&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16802&range=01-02

  Stats: 16 lines in 2 files changed: 10 ins; 0 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/16802.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16802/head:pull/16802

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


More information about the hotspot-dev mailing list