RFR: 8317720: RISC-V: Implement Adler32 intrinsic [v7]
Gui Cao
gcao at openjdk.org
Tue May 21 07:46:08 UTC 2024
On Fri, 17 May 2024 13:44:18 GMT, Gui Cao <gcao at openjdk.org> wrote:
>> ArsenyBochkarev has updated the pull request incrementally with eight additional commits since the last revision:
>>
>> - Prettify L_nmax loop
>> - Add comments in functions
>> - Add explanation comment for L_nmax_loop
>> - Fix L_nmax_loop for big lengths
>> - Fix L_by16 loop step
>> - Prettify intrinsic
>> - Use LMUL=4 for most of the calculations
>> - Use LMUL to load multiple data in one step
>
> I also ran the correctness test on the Banana Pi BPI-F3 board (has RVV1.0):
>
> Before this patch and disable UseRVV:
> Test `test/hotspot/jtreg/compiler/intrinsics/zip/TestAdler32.java` is ok
> Before this patch and enable UseRVV:
> Test `test/hotspot/jtreg/compiler/intrinsics/zip/TestAdler32.java` is ok
>
> Apply this patch and disable UseRVV:
> Test `test/hotspot/jtreg/compiler/intrinsics/zip/TestAdler32.java` is ok
> Apply this patch and enable UseRVV:
> Test `test/hotspot/jtreg/compiler/intrinsics/zip/TestAdler32.java` is Failed
>
> The TestAdler32.jtr on Failed is as follows:
> [TestAdler32.jtr.log](https://github.com/openjdk/jdk/files/15350178/TestAdler32.jtr.log)
> Hello @zifeihan! Thanks for your efforts on improving this PR. I don't have access (yet) to Banana Pi board, so I can't debug precisely the case you pointed out. However, I know that vlen for Banana Pi is 256 bit, so I fixed problems for this case and checked functional correctness on QEMU for both 128 and 256 bit, which is OK now. Could you please do a re-run of `test/hotspot/jtreg/compiler/intrinsics/zip/TestAdler32.java` test?
Sorry for being late, JMH performance test data just finished.
Apply this pr and enable UseRVV:
- [x] Correctness test `test/hotspot/jtreg/compiler/intrinsics/zip/TestAdler32.java` passed normally.
- [x] JMH test `test/micro/org/openjdk/bench/java/util/TestAdler32.java` passed normally.
Benchmark (count) Mode Cnt Score Error Units
TestAdler32.testAdler32Update 64 thrpt 25 7865.764 ± 57.876 ops/ms
TestAdler32.testAdler32Update 128 thrpt 25 6361.346 ± 0.178 ops/ms
TestAdler32.testAdler32Update 256 thrpt 25 4595.217 ± 0.166 ops/ms
TestAdler32.testAdler32Update 512 thrpt 25 2941.284 ± 12.318 ops/ms
TestAdler32.testAdler32Update 1024 thrpt 25 1728.568 ± 0.053 ops/ms
TestAdler32.testAdler32Update 2048 thrpt 25 943.173 ± 1.043 ops/ms
TestAdler32.testAdler32Update 5012 thrpt 25 404.343 ± 0.205 ops/ms
TestAdler32.testAdler32Update 8192 thrpt 25 249.495 ± 1.986 ops/ms
TestAdler32.testAdler32Update 16384 thrpt 25 126.168 ± 1.261 ops/ms
TestAdler32.testAdler32Update 32768 thrpt 25 61.925 ± 0.607 ops/ms
TestAdler32.testAdler32Update 65536 thrpt 25 30.866 ± 0.375 ops/ms
Finished running test 'micro:java.util.TestAdler32'
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18382#issuecomment-2121969207
More information about the hotspot-compiler-dev
mailing list