RFR: 8266317: Vector API enhancements
This PR contains API and implementation changes for [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), in preparation for when targeted. Enhancements are made to the API for the support of operations on characters, such as for UTF-8 character decoding. Specifically, methods for loading/storing a `short` vector from/to a `char[]` array, and new vector comparison operators for unsigned comparisons with integral vectors. The x64 implementation is enhanced to supported unsigned comparisons. Enhancements are made to the API for loading/storing a `byte` vector from/to a `boolean[]` array. The testing of loads/stores can be expanded for scatter/gather, but before doing that i think some refactoring of the tests is required to reposition tests in the right classes. I would like to do that work after integration of the PR. ------------- Commit messages: - Minor clarifications to the specification. - 8266317: Vector API enhancements Changes: https://git.openjdk.java.net/jdk/pull/3803/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3803&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8266317 Stats: 10002 lines in 121 files changed: 9070 ins; 190 del; 742 mod Patch: https://git.openjdk.java.net/jdk/pull/3803.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3803/head:pull/3803 PR: https://git.openjdk.java.net/jdk/pull/3803
On Thu, 29 Apr 2021 21:13:38 GMT, Paul Sandoz <psandoz@openjdk.org> wrote:
This PR contains API and implementation changes for [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), in preparation for when targeted.
Enhancements are made to the API for the support of operations on characters, such as for UTF-8 character decoding. Specifically, methods for loading/storing a `short` vector from/to a `char[]` array, and new vector comparison operators for unsigned comparisons with integral vectors. The x64 implementation is enhanced to supported unsigned comparisons.
Enhancements are made to the API for loading/storing a `byte` vector from/to a `boolean[]` array.
The testing of loads/stores can be expanded for scatter/gather, but before doing that i think some refactoring of the tests is required to reposition tests in the right classes. I would like to do that work after integration of the PR.
All tests pass for tier1,tier2,tier3 for build profiles linux-x64, linux-aarch64, macosx-x64, and windows-x64. ------------- PR: https://git.openjdk.java.net/jdk/pull/3803
On Thu, 29 Apr 2021 21:13:38 GMT, Paul Sandoz <psandoz@openjdk.org> wrote:
This PR contains API and implementation changes for [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), in preparation for when targeted.
Enhancements are made to the API for the support of operations on characters, such as for UTF-8 character decoding. Specifically, methods for loading/storing a `short` vector from/to a `char[]` array, and new vector comparison operators for unsigned comparisons with integral vectors. The x64 implementation is enhanced to supported unsigned comparisons.
Enhancements are made to the API for loading/storing a `byte` vector from/to a `boolean[]` array.
The testing of loads/stores can be expanded for scatter/gather, but before doing that i think some refactoring of the tests is required to reposition tests in the right classes. I would like to do that work after integration of the PR.
Reviewed X86 backend changes for unsigned comparison. ------------- Marked as reviewed by jbhateja (Committer). PR: https://git.openjdk.java.net/jdk/pull/3803
On Thu, 29 Apr 2021 21:13:38 GMT, Paul Sandoz <psandoz@openjdk.org> wrote:
This PR contains API and implementation changes for [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), in preparation for when targeted.
Enhancements are made to the API for the support of operations on characters, such as for UTF-8 character decoding. Specifically, methods for loading/storing a `short` vector from/to a `char[]` array, and new vector comparison operators for unsigned comparisons with integral vectors. The x64 implementation is enhanced to supported unsigned comparisons.
Enhancements are made to the API for loading/storing a `byte` vector from/to a `boolean[]` array.
The testing of loads/stores can be expanded for scatter/gather, but before doing that i think some refactoring of the tests is required to reposition tests in the right classes. I would like to do that work after integration of the PR.
Looks good. src/hotspot/cpu/aarch64/aarch64.ad line 2440:
2438: } 2439: 2440: bool Matcher::supports_unsigned_vector_comparison(int vlen, BasicType bt) {
`Matcher::supports_vector_comparison_unsigned()` looks a better fit. ------------- Marked as reviewed by vlivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/3803
On Mon, 10 May 2021 21:05:02 GMT, Vladimir Ivanov <vlivanov@openjdk.org> wrote:
Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision:
Rename method.
src/hotspot/cpu/aarch64/aarch64.ad line 2440:
2438: } 2439: 2440: bool Matcher::supports_unsigned_vector_comparison(int vlen, BasicType bt) {
`Matcher::supports_vector_comparison_unsigned()` looks a better fit.
I renamed the method (see commit). ------------- PR: https://git.openjdk.java.net/jdk/pull/3803
This PR contains API and implementation changes for [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), in preparation for when targeted.
Enhancements are made to the API for the support of operations on characters, such as for UTF-8 character decoding. Specifically, methods for loading/storing a `short` vector from/to a `char[]` array, and new vector comparison operators for unsigned comparisons with integral vectors. The x64 implementation is enhanced to supported unsigned comparisons.
Enhancements are made to the API for loading/storing a `byte` vector from/to a `boolean[]` array.
The testing of loads/stores can be expanded for scatter/gather, but before doing that i think some refactoring of the tests is required to reposition tests in the right classes. I would like to do that work after integration of the PR.
Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision: Rename method. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/3803/files - new: https://git.openjdk.java.net/jdk/pull/3803/files/de210a88..93b093c1 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3803&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3803&range=00-01 Stats: 7 lines in 7 files changed: 0 ins; 0 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/3803.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3803/head:pull/3803 PR: https://git.openjdk.java.net/jdk/pull/3803
On Mon, 10 May 2021 21:37:25 GMT, Paul Sandoz <psandoz@openjdk.org> wrote:
This PR contains API and implementation changes for [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), in preparation for when targeted.
Enhancements are made to the API for the support of operations on characters, such as for UTF-8 character decoding. Specifically, methods for loading/storing a `short` vector from/to a `char[]` array, and new vector comparison operators for unsigned comparisons with integral vectors. The x64 implementation is enhanced to supported unsigned comparisons.
Enhancements are made to the API for loading/storing a `byte` vector from/to a `boolean[]` array.
The testing of loads/stores can be expanded for scatter/gather, but before doing that i think some refactoring of the tests is required to reposition tests in the right classes. I would like to do that work after integration of the PR.
Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision:
Rename method.
Marked as reviewed by vlivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/3803
This PR contains API and implementation changes for [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), in preparation for when targeted.
Enhancements are made to the API for the support of operations on characters, such as for UTF-8 character decoding. Specifically, methods for loading/storing a `short` vector from/to a `char[]` array, and new vector comparison operators for unsigned comparisons with integral vectors. The x64 implementation is enhanced to supported unsigned comparisons.
Enhancements are made to the API for loading/storing a `byte` vector from/to a `boolean[]` array.
The testing of loads/stores can be expanded for scatter/gather, but before doing that i think some refactoring of the tests is required to reposition tests in the right classes. I would like to do that work after integration of the PR.
Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision: JavaDoc refs for unsigned operators. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/3803/files - new: https://git.openjdk.java.net/jdk/pull/3803/files/93b093c1..aa6bb717 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3803&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3803&range=01-02 Stats: 16 lines in 1 file changed: 12 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/3803.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3803/head:pull/3803 PR: https://git.openjdk.java.net/jdk/pull/3803
This PR contains API and implementation changes for [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), in preparation for when targeted.
Enhancements are made to the API for the support of operations on characters, such as for UTF-8 character decoding. Specifically, methods for loading/storing a `short` vector from/to a `char[]` array, and new vector comparison operators for unsigned comparisons with integral vectors. The x64 implementation is enhanced to supported unsigned comparisons.
Enhancements are made to the API for loading/storing a `byte` vector from/to a `boolean[]` array.
The testing of loads/stores can be expanded for scatter/gather, but before doing that i think some refactoring of the tests is required to reposition tests in the right classes. I would like to do that work after integration of the PR.
Paul Sandoz has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: - Merge remote-tracking branch 'upstream/master' into JDK-8266317-vector-api-enhancements - JavaDoc refs for unsigned operators. - Rename method. - Minor clarifications to the specification. - 8266317: Vector API enhancements ------------- Changes: https://git.openjdk.java.net/jdk/pull/3803/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3803&range=03 Stats: 10016 lines in 121 files changed: 9084 ins; 190 del; 742 mod Patch: https://git.openjdk.java.net/jdk/pull/3803.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3803/head:pull/3803 PR: https://git.openjdk.java.net/jdk/pull/3803
This PR contains API and implementation changes for [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), in preparation for when targeted.
Enhancements are made to the API for the support of operations on characters, such as for UTF-8 character decoding. Specifically, methods for loading/storing a `short` vector from/to a `char[]` array, and new vector comparison operators for unsigned comparisons with integral vectors. The x64 implementation is enhanced to supported unsigned comparisons.
Enhancements are made to the API for loading/storing a `byte` vector from/to a `boolean[]` array.
The testing of loads/stores can be expanded for scatter/gather, but before doing that i think some refactoring of the tests is required to reposition tests in the right classes. I would like to do that work after integration of the PR.
Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision: Check vlen in bytes for unsigned support ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/3803/files - new: https://git.openjdk.java.net/jdk/pull/3803/files/12b23f62..20a9c9ce Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3803&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3803&range=03-04 Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/3803.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3803/head:pull/3803 PR: https://git.openjdk.java.net/jdk/pull/3803
On Thu, 29 Apr 2021 21:13:38 GMT, Paul Sandoz <psandoz@openjdk.org> wrote:
This PR contains API and implementation changes for [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), in preparation for when targeted.
Enhancements are made to the API for the support of operations on characters, such as for UTF-8 character decoding. Specifically, methods for loading/storing a `short` vector from/to a `char[]` array, and new vector comparison operators for unsigned comparisons with integral vectors. The x64 implementation is enhanced to supported unsigned comparisons.
Enhancements are made to the API for loading/storing a `byte` vector from/to a `boolean[]` array.
The testing of loads/stores can be expanded for scatter/gather, but before doing that i think some refactoring of the tests is required to reposition tests in the right classes. I would like to do that work after integration of the PR.
This pull request has now been integrated. Changeset: 5982cfc8 Author: Paul Sandoz <psandoz@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/5982cfc85602862608fae56adb6041794e8c... Stats: 10017 lines in 121 files changed: 9085 ins; 190 del; 742 mod 8266317: Vector API enhancements Co-authored-by: Paul Sandoz <psandoz@openjdk.org> Co-authored-by: Sandhya Viswanathan <sviswanathan@openjdk.org> Reviewed-by: jbhateja, vlivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/3803
participants (3)
-
Jatin Bhateja
-
Paul Sandoz
-
Vladimir Ivanov