jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8321010: RISC-V: C2 RoundVF

Open Hamlin-Li opened this issue 1 year ago • 15 comments

Hi, Can you have a review on this patch to add RoundVF/RoundDF intrinsics? 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


Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue

Issues

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17745/head:pull/17745
$ git checkout pull/17745

Update a local copy of the PR:
$ git checkout pull/17745
$ git pull https://git.openjdk.org/jdk.git pull/17745/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17745

View PR using the GUI difftool:
$ git pr show -t 17745

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17745.diff

Webrev

Link to Webrev Comment

Hamlin-Li avatar Feb 07 '24 09:02 Hamlin-Li

:wave: Welcome back mli! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Feb 07 '24 09:02 bridgekeeper[bot]

@Hamlin-Li The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

openjdk[bot] avatar Feb 07 '24 09:02 openjdk[bot]

/solves JDK-8321011

Hamlin-Li avatar Feb 07 '24 10:02 Hamlin-Li

@Hamlin-Li Adding additional issue to solves list: 8321011: RISC-V: C2 RoundVD.

openjdk[bot] avatar Feb 07 '24 10:02 openjdk[bot]

Hello Hamlin, I recall you had licheepi board. I would be nice if you can try to measure rvv performance gain with this https://github.com/syntacore/syntaj21/tree/rvv0.7.1

This PR showed it's not always easy to win perf just by using rvv - https://github.com/openjdk/jdk/pull/17413

I understand it might not be possible, but would be nice to give it a try (I can share hsdis with support for 0.7.1 if needed)

VladimirKempik avatar Feb 07 '24 14:02 VladimirKempik

@VladimirKempik Thanks for your comments, I'll consider it.

Hamlin-Li avatar Feb 07 '24 15:02 Hamlin-Li

Hey, I'll be on vacation for a while, so maybe slow in response. But please leave your comments freely as usual.

Hamlin-Li avatar Feb 07 '24 15:02 Hamlin-Li

Hello Hamlin, I recall you had licheepi board. I would be nice if you can try to measure rvv performance gain with this https://github.com/syntacore/syntaj21/tree/rvv0.7.1

This PR showed it's not always easy to win perf just by using rvv - #17413

I understand it might not be possible, but would be nice to give it a try (I can share hsdis with support for 0.7.1 if needed)

Had a internal discussion about your suggestion, seems 0.7.1 is not incompatible with 1.0/2.0, and for this simple intrinsic, we think a better path is to have it first, then re-visit it when we have real hardware to measure the performance later.

Hamlin-Li avatar Feb 21 '24 16:02 Hamlin-Li

❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.

openjdk[bot] avatar Mar 13 '24 20:03 openjdk[bot]

@Hamlin-Li: Thanks for the quick update. Considering that saving/restoring for FRM could be expensive, I do wonder if we could gather some performance numbers before we go. I see people are now testing on RVV-1.0 hardwares [1] and I am also trying to get one (AFAIK, more powerful RVV-1.0 hardwares are also coming later this year, SG2044, SG2380, etc.). Also from discussion on [2], I see there are also other approaches available there without flipping the FP rounding mode. But I am not sure if they make sense for our case or work better without actual testing.

[1] https://github.com/openjdk/jdk/pull/18382#issuecomment-2045145255 [2] https://github.com/openjdk/jdk/pull/8204

RealFYang avatar Apr 22 '24 03:04 RealFYang

@Hamlin-Li: Thanks for the quick update. Considering that saving/restoring for FRM could be expensive, I do wonder if we could gather some performance numbers before we go. I see people are now testing on RVV-1.0 hardwares [1] and I am also trying to get one (AFAIK, more powerful RVV-1.0 hardwares are also coming later this year, SG2044, SG2380, etc.). Also from discussion on [2], I see there are also other approaches available there without flipping the FP rounding mode. But I am not sure if they make sense for our case or work better without actual testing.

[1] #18382 (comment) [2] #8204

Thanks for the information, let me do some investigation on the solution in https://github.com/openjdk/jdk/pull/8204.

Hamlin-Li avatar Apr 22 '24 14:04 Hamlin-Li

@Hamlin-Li this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout round-F+D-v
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

openjdk[bot] avatar May 09 '24 23:05 openjdk[bot]

@Hamlin-Li This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Jun 07 '24 02:06 bridgekeeper[bot]

in progress...

Hamlin-Li avatar Jun 07 '24 09:06 Hamlin-Li

Hey, Is someone avaiable to review this patch again? Thanks!

Hamlin-Li avatar Aug 19 '24 07:08 Hamlin-Li