Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v12]

2024-10-09 Thread Hamlin Li
On Tue, 8 Oct 2024 14:56:56 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v12]

2024-10-09 Thread Nick Gasson
On Tue, 8 Oct 2024 15:13:06 GMT, Hamlin Li wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> keep comma > > Sorry for the inconvenience. Thanks for your quick re-reviews! @Hamlin-Li are you still planning to re-submit

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v12]

2024-10-08 Thread Hamlin Li
On Tue, 8 Oct 2024 14:56:56 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v12]

2024-10-08 Thread Ludovic Henry
On Tue, 8 Oct 2024 14:56:56 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v12]

2024-10-08 Thread Magnus Ihse Bursie
On Tue, 8 Oct 2024 14:56:56 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v11]

2024-10-08 Thread Hamlin Li
On Tue, 8 Oct 2024 14:46:02 GMT, Magnus Ihse Bursie wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> make minor > > make/modules/jdk.incubator.vector/Lib.gmk line 53: > >> 51: DISABLED_WARNINGS_gcc := unused-fun

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v12]

2024-10-08 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v11]

2024-10-08 Thread Magnus Ihse Bursie
On Tue, 8 Oct 2024 14:07:45 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v11]

2024-10-08 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-08 Thread Hamlin Li
On Mon, 7 Oct 2024 09:50:16 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-08 Thread Hamlin Li
On Tue, 8 Oct 2024 13:40:53 GMT, Hamlin Li wrote: >> So is the `LIBS` line as well. And the CFLAGS line should be just: >> >>CFLAGS := -march=rv64gcv, \ > > No worries, it's not late. Take care! Do you suggest something like below? EXTRA_SRC := libsleef/generated, \ DISAB

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-08 Thread Hamlin Li
On Tue, 8 Oct 2024 13:25:17 GMT, Magnus Ihse Bursie wrote: >> make/modules/jdk.incubator.vector/Lib.gmk line 50: >> >>> 48: DISABLED_WARNINGS_clang := unused-function sign-compare >>> tautological-compare ignored-qualifiers, \ >>> 49: CFLAGS := $(CFLAGS_JDKLIB) -march=rv64gcv, \ >>>

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-08 Thread Magnus Ihse Bursie
On Mon, 7 Oct 2024 09:50:16 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-08 Thread Magnus Ihse Bursie
On Mon, 7 Oct 2024 09:50:16 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-08 Thread Magnus Ihse Bursie
On Tue, 8 Oct 2024 13:23:21 GMT, Magnus Ihse Bursie wrote: >> Hamlin Li has updated the pull request with a new target base due to a merge >> or a rebase. The pull request now contains 11 commits: >> >> - merge master >> - bits > 512 >> - fix test macro >> - check frm after sleef call >> -

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-08 Thread Ludovic Henry
On Mon, 7 Oct 2024 09:50:16 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v9]

2024-10-08 Thread Hamlin Li
On Mon, 7 Oct 2024 09:16:42 GMT, Ludovic Henry wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> bits > 512 > > Marked as reviewed by luhenry (Committer). @luhenry I merged this pr with the master to resolve conflict a

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-10-08 Thread Hamlin Li
On Mon, 23 Sep 2024 13:12:16 GMT, Erik Joelsson wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> modify cflags style > > Build changes look ok. @erikj79 @RealFYang Hi, can you help to reapprove the pr? I guess it's be

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-07 Thread Hamlin Li
On Mon, 7 Oct 2024 09:50:16 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-07 Thread Robbin Ehn
On Mon, 7 Oct 2024 09:50:16 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-07 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v9]

2024-10-07 Thread Ludovic Henry
On Mon, 30 Sep 2024 10:33:20 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v9]

2024-09-30 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-30 Thread Hamlin Li
On Mon, 30 Sep 2024 09:01:24 GMT, Ludovic Henry wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix test macro > > src/hotspot/share/opto/vectorIntrinsics.cpp line 2044: > >> 2042: } >> 2043: >> 2044: if (addr =

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-30 Thread Ludovic Henry
On Thu, 26 Sep 2024 13:14:04 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-29 Thread Fei Yang
On Thu, 26 Sep 2024 13:14:04 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-27 Thread Hamlin Li
On Fri, 27 Sep 2024 08:10:35 GMT, Fei Yang wrote: >> `NDEBUG` is only used in sleefdp.c which is the original sleef code, and we >> don't use that file in jdk directly, in java.base module of jdk it uses >> `DEBUG` but not use `NDEBUG`. >> Based on above information, I think `DEBUG` is better.

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-27 Thread Fei Yang
On Fri, 27 Sep 2024 07:06:44 GMT, Hamlin Li wrote: >> src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c line 51: >> >>> 49: // the dynamic rounding mode is always RNE. >>> 50: >>> 51: #ifdef DEBUG >> >> Question: Should we check for `NDEBUG` macro (A macro specified by C/C++

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-27 Thread Hamlin Li
On Fri, 27 Sep 2024 02:22:58 GMT, Fei Yang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix test macro > > src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c line 51: > >> 49: // the dynamic roun

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-26 Thread Fei Yang
On Thu, 26 Sep 2024 13:14:04 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-26 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-26 Thread Hamlin Li
On Thu, 26 Sep 2024 07:54:32 GMT, Hamlin Li wrote: >> Just a bit worried about the fact that manipunating CSR could be very costly >> on RISC-V. Another choice would be adding an assertion about FP rounding >> mode expecting RNE when returning back from the SLEEF routine. I also >> checked flo

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v7]

2024-09-26 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-26 Thread Hamlin Li
On Thu, 26 Sep 2024 02:15:34 GMT, Fei Yang wrote: >> I see sleef code only set frm to RNE, but I'm not quite sure. >> Even if we can make sure current sleef only set frm to RNE, seems to me we >> can not depends on current implement, it could change. Although good news is >> we don't update sle

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-25 Thread Fei Yang
On Wed, 25 Sep 2024 20:10:41 GMT, Hamlin Li wrote: >> Good question! >> Let me do some further investigation and get back later. > > I see sleef code only set frm to RNE, but I'm not quite sure. > Even if we can make sure current sleef only set frm to RNE, seems to me we > can not depends on cur

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-25 Thread Hamlin Li
On Wed, 25 Sep 2024 14:04:35 GMT, Hamlin Li wrote: >> src/hotspot/cpu/riscv/riscv.ad line 10079: >> >>> 10077: match(CallLeafVector); >>> 10078: >>> 10079: effect(USE meth, KILL cr); >> >> I haven't checked the details of `CallLeafVector` yet. One more question >> here. Is it safe to assu

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-25 Thread Hamlin Li
On Wed, 25 Sep 2024 02:29:11 GMT, Fei Yang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use all arg v regs > > src/hotspot/cpu/riscv/riscv.ad line 10079: > >> 10077: match(CallLeafVector); >> 10078: >> 10079:

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-24 Thread Fei Yang
On Tue, 24 Sep 2024 19:12:53 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Fei Yang
On Tue, 24 Sep 2024 19:09:29 GMT, Hamlin Li wrote: >> Then why would we put a constraint on the number of supported argument >> vector registers here (v8-v15 instead of v8-v23)? Could we just support all >> of them, i.e., v8-v23 to comply with the RISC-V psABI? > > There is no strong reason, ju

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Hamlin Li
On Tue, 24 Sep 2024 15:12:29 GMT, Fei Yang wrote: >> Yes, sorry what I meant, updated. > > Then why would we put a constraint on the number of supported argument vector > registers here (v8-v15 instead of v8-v23)? Could we just support all of them, > i.e., v8-v23 to comply with the RISC-V psABI

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-24 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Fei Yang
On Tue, 24 Sep 2024 14:57:48 GMT, Robbin Ehn wrote: >> Thanks Robbin for helping explaining! >> >> minor correction: v1-v7/v24-v31 = callee saved > > Yes, sorry what I meant, updated. Then why would we put a constraint on the number of supported argument vector registers here (v8-v15 instead o

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Robbin Ehn
On Tue, 24 Sep 2024 14:52:39 GMT, Hamlin Li wrote: >> Ah, I think I missed that. I was reading psABI spec 1.0 release. Thanks for >> this info. > > Thanks Robbin for helping explaining! > > minor correction: v1-v7/v24-v31 = callee saved Yes, sorry what I meant, updated. - PR Revi

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Hamlin Li
On Tue, 24 Sep 2024 03:47:41 GMT, Fei Yang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> refine comment > > src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 6063: > >> 6061: >> 6062: void generate_vector_math_

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Hamlin Li
On Tue, 24 Sep 2024 05:57:08 GMT, Robbin Ehn wrote: >> src/hotspot/cpu/riscv/riscv.ad line 10078: >> >>> 10076: match(CallLeafVector); >>> 10077: >>> 10078: effect(USE meth); >> >> It's possible for the runtime call to clobber rFlagsReg `cr` (aka `t1`). So >> safer to add `KILL cr` to the

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Hamlin Li
On Tue, 24 Sep 2024 06:59:58 GMT, Fei Yang wrote: >> Note in the RISC-V ELF psABI there is a convention variant for v-regs. >> If you add function attribute riscv_vector_cc it should be used for C/C++. >> (I never tested it) >> v0 = first vector mask argument >> v8-v23 = args/rets >> v1-v7/v24-v

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v5]

2024-09-24 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Fei Yang
On Tue, 24 Sep 2024 05:25:38 GMT, Robbin Ehn wrote: >> src/hotspot/cpu/riscv/assembler_riscv.hpp line 51: >> >>> 49: n_int_register_parameters_c = 8, // x10, x11, ... x17 (c_rarg0, >>> c_rarg1, ...) >>> 50: n_float_register_parameters_c = 8, // f10, f11, ... f17 (c_farg0, >>> c_f

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-23 Thread Robbin Ehn
On Tue, 24 Sep 2024 03:50:29 GMT, Fei Yang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> refine comment > > src/hotspot/cpu/riscv/riscv.ad line 10078: > >> 10076: match(CallLeafVector); >> 10077: >> 10078: eff

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-23 Thread Robbin Ehn
On Tue, 24 Sep 2024 03:45:32 GMT, Fei Yang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> refine comment > > src/hotspot/cpu/riscv/assembler_riscv.hpp line 51: > >> 49: n_int_register_parameters_c = 8, // x1

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-23 Thread Fei Yang
On Mon, 23 Sep 2024 19:32:10 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v3]

2024-09-23 Thread Hamlin Li
On Mon, 23 Sep 2024 16:40:55 GMT, Ludovic Henry wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comment > > src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c line 31: > >> 29: // bridge functions b

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-23 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v3]

2024-09-23 Thread Ludovic Henry
On Mon, 23 Sep 2024 16:25:02 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-09-23 Thread Hamlin Li
On Mon, 23 Sep 2024 09:09:46 GMT, Ludovic Henry wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> modify cflags style > > src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c line 24: > >> 22: */ >> 23

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-09-23 Thread Hamlin Li
On Mon, 23 Sep 2024 07:30:59 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v3]

2024-09-23 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-09-23 Thread Erik Joelsson
On Mon, 23 Sep 2024 07:30:59 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-09-23 Thread Ludovic Henry
On Mon, 23 Sep 2024 07:30:59 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vectorize

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-09-23 Thread Hamlin Li
On Fri, 20 Sep 2024 12:34:38 GMT, Erik Joelsson wrote: >> Thanks. I'm sorry too, I'm not familiar with the build system. >> What you expected could be something like below? >> >> diff --git a/make/modules/jdk.incubator.vector/Lib.gmk >> b/make/modules/jdk.incubator.vector/Lib.gmk >> index 5e522

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-09-23 Thread Hamlin Li
> Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the math operations in vector api. > > On machine with vec

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-20 Thread Erik Joelsson
On Thu, 19 Sep 2024 16:35:14 GMT, Hamlin Li wrote: >> Sorry, I had to remind myself of how this works. We actually set this as a >> separate parameter on the Setup macro: `OPTIMIZATION := HIGH` > > Thanks. I'm sorry too, I'm not familiar with the build system. > What you expected could be someth

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-20 Thread Ludovic Henry
On Thu, 19 Sep 2024 08:32:38 GMT, Hamlin Li wrote: > Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the ma

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-19 Thread Hamlin Li
On Thu, 19 Sep 2024 16:02:36 GMT, Erik Joelsson wrote: >> Thanks, do you mean something like below? I'll fix it. >> >> CFLAGS := $(CFLAGS_JDKLIB) $(C_O_FLAG_HI) -march=rv64gcv, \ > > Sorry, I had to remind myself of how this works. We actually set this as a > separate parameter on the Setup mac

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-19 Thread Erik Joelsson
On Thu, 19 Sep 2024 13:47:50 GMT, Hamlin Li wrote: >> make/modules/jdk.incubator.vector/Lib.gmk line 48: >> >>> 46: DISABLED_WARNINGS_gcc := unused-function sign-compare >>> tautological-compare ignored-qualifiers, \ >>> 47: DISABLED_WARNINGS_clang := unused-function sign-compare >

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-19 Thread Hamlin Li
On Thu, 19 Sep 2024 12:52:59 GMT, Erik Joelsson wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vecto

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-19 Thread Erik Joelsson
On Thu, 19 Sep 2024 08:32:38 GMT, Hamlin Li wrote: > Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the ma

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-19 Thread Hamlin Li
On Thu, 19 Sep 2024 08:32:38 GMT, Hamlin Li wrote: > Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef api to vectorize the ma

RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-19 Thread Hamlin Li
Hi, Can you help to review this patch? Thanks! This patch is based on https://github.com/openjdk/jdk/pull/20781 which added the sleef source (in particular the generated sleef inline headers). We use sleef api to vectorize the math operations in vector api. On machine with vector intrinsic supp