RFR: 8321010: RISC-V: C2 RoundVF [v15]
Hamlin Li
mli at openjdk.org
Thu Jul 25 14:29:55 UTC 2024
> Hi,
> Can you have a review on this patch to add RoundVF/RoundDF intrinsics?
>
> Current test shows that, it bring performance gain when vlenb >= 32 (which is on bananapi), but bring regression when vlenb == 16 (which is on k230). So I only enable the intrinsic when vlenb >= 32.
>
> For double, even vlenb == 32, there is still some regression, so in this pr I only enable it when vlenb >= 64. Although there is no hardware to verify it, I think from the trend of performance data on bananapi and k230, it's promising to bring better performance rather than regression for double when vlenb == 64+. Please compare the data of `Benchmark on bananapi, +UseSuperWord` and `Benchmark on k230, +UseSuperWord, enable RoundVF/D when vlenb == 16`.
>
> Thanks!
>
> ## Tests
>
> test/hotspot/jtreg/compiler/vectorization/TestRoundVectRiscv64.java test/hotspot/jtreg/compiler/c2/cr6340864/TestFloatVect.java test/hotspot/jtreg/compiler/c2/cr6340864/TestDoubleVect.java test/hotspot/jtreg/compiler/floatingpoint/TestRound.java
>
> test/jdk/java/lang/Math/RoundTests.java
>
> ## Performance
>
> ### on bananapi
> Benchmark on bananapi, +UseSuperWord
> <google-sheets-html-origin style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
> Benchmark on bananapi, +UseSuperWord | (TESTSIZE) | Mode | Cnt | Score +intrinsic | Score -intrinsic | Error | Units | Improvement
> -- | -- | -- | -- | -- | -- | -- | -- | --
> FpRoundingBenchmark.test_round_double | 2048 | avgt | 10 | 23794.153 | 20557.467 | 2899.266 | ns/op | 0.864
> FpRoundingBenchmark.test_round_float | 2048 | avgt | 10 | 11531.853 | 16562.431 | 865.779 | ns/op | 1.436
>
> </google-sheets-html-origin>
>
> Benchmark on bananapi, -UseSuperWord
> <google-sheets-html-origin style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
> Benchmark on bananapi, -UseSuperWord | (TESTSIZE) | Mode | Cnt | Score +intrinsic | Score -intrinsic | Error | Units | Improvement
> -- | -- | -- | -- | -- | -- | -- | -- | --
> FpRoundingBenchmark.test_round_double | ...
Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
minor
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17745/files
- new: https://git.openjdk.org/jdk/pull/17745/files/32baf7e7..24559788
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17745&range=14
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17745&range=13-14
Stats: 2 lines in 2 files changed: 1 ins; 1 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/17745.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17745/head:pull/17745
PR: https://git.openjdk.org/jdk/pull/17745
More information about the hotspot-compiler-dev
mailing list