Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-30 Thread Xiaohong Gong
On Wed, 22 Nov 2023 09:05:31 GMT, Andrew Haley wrote: >>> Have you considered the possibility of copying the sleef source to the >>> OpenJDK repository and thereby it becomes part of the build process? I >>> don't know how straightforward that is technically and IANAL but I think >>> it's

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-26 Thread Xiaohong Gong
On Thu, 23 Nov 2023 14:01:48 GMT, Magnus Ihse Bursie wrote: >> OK, I see. It makes sense that the suffix name should be choosed mainly >> based on the real module name that is searched/checked in configure. > > This still needs fixing. Yes, I will fix this together with removing the SVE cflags

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-23 Thread Magnus Ihse Bursie
On Thu, 23 Nov 2023 01:41:46 GMT, Xiaohong Gong wrote: >> As I said above, you should not mix the two together. Keep the library >> handling for libsleef. Move the march setting to where it belongs. And >> rename the files, functions and variables after this. > > OK, I see. It makes sense that

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-23 Thread Magnus Ihse Bursie
On Thu, 23 Nov 2023 08:40:57 GMT, Xiaohong Gong wrote: >> Thanks for the advice! I will take a consideration for it. > >> Thirdly, I do not like at all how you just come crashing in setting -march >> like that. The -march flag is handled by FLAGS_SETUP_ABI_PROFILE. > > `-march=armv8-a+sve` is

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-23 Thread Xiaohong Gong
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-23 Thread Xiaohong Gong
On Thu, 23 Nov 2023 01:28:40 GMT, Xiaohong Gong wrote: >> Ah, now I se what you are trying to do here. First of all, in the detection >> part, only set `SVE_FEATURE_SUPPORT`. Then you can handle the `SVE_CFLAGS` >> addition elsewhere/later. >> >> Secondly, you should not mix these

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-22 Thread Xiaohong Gong
On Tue, 21 Nov 2023 14:13:19 GMT, Magnus Ihse Bursie wrote: >> Yes, it seems weird. But the library we want to built out is `libvmath.so` >> instead of `libsleef.so`. And we not only check the sleef library, but also >> the ARM SVE feature inside it. So using `VMATH` suffix is more reasonable

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-22 Thread Xiaohong Gong
On Tue, 21 Nov 2023 14:12:13 GMT, Magnus Ihse Bursie wrote: >> This is just used to print the result of `AC_MSG_CEHCKING[if ARM SVE feature >> is supported]` in configure. > > Ah, now I se what you are trying to do here. First of all, in the detection > part, only set `SVE_FEATURE_SUPPORT`.

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-22 Thread Magnus Ihse Bursie
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-22 Thread Paul Sandoz
On Wed, 22 Nov 2023 09:05:31 GMT, Andrew Haley wrote: > > Have you considered the possibility of copying the sleef source to the > > OpenJDK repository and thereby it becomes part of the build process? I > > don't know how straightforward that is technically and IANAL but I think > > it's

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-22 Thread Andrew Haley
On Wed, 22 Nov 2023 01:52:51 GMT, Xiaohong Gong wrote: > > Have you considered the possibility of copying the sleef source to the > > OpenJDK repository and thereby it becomes part of the build process? I > > don't know how straightforward that is technically and IANAL but I think > > it's

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-21 Thread Xiaohong Gong
On Wed, 22 Nov 2023 00:05:26 GMT, Paul Sandoz wrote: > Have you considered the possibility of copying the sleef source to the > OpenJDK repository and thereby it becomes part of the build process? I don't > know how straightforward that is technically and IANAL but I think it's worth >

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-21 Thread Xiaohong Gong
On Tue, 21 Nov 2023 18:14:41 GMT, Paul Sandoz wrote: > > This looks good. As far as I can tell the choice you've made of accuracy > > matches what we need to meet the spec. > > Same here . Sinh/cosh/tanh/expm1 are specified to be within 2.5 ulps of the > exact result, but i believe sleef does

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-21 Thread Paul Sandoz
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-21 Thread Paul Sandoz
On Mon, 23 Oct 2023 09:02:35 GMT, Xiaohong Gong wrote: > This looks good. As far as I can tell the choice you've made of accuracy > matches what we need to meet the spec. Same here . Sinh/cosh/tanh/expm1 are specified to be within 2.5 ulps of the exact result, but i believe sleef does not

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-21 Thread Magnus Ihse Bursie
On Mon, 20 Nov 2023 01:47:34 GMT, Xiaohong Gong wrote: >> make/autoconf/lib-vmath.m4 line 92: >> >>> 90: [] >>> 91: ) >>> 92: AC_MSG_RESULT([${SVE_FEATURE_SUPPORT}]) >> >> What is this test even for? I can't see any usage of SVE_FEATURE_SUPPORT >> outside this

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-19 Thread Xiaohong Gong
On Thu, 16 Nov 2023 13:00:03 GMT, Magnus Ihse Bursie wrote: >> Xiaohong Gong has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains five additional >>

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-16 Thread Magnus Ihse Bursie
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-16 Thread Magnus Ihse Bursie
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-16 Thread Magnus Ihse Bursie
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-15 Thread Xiaohong Gong
On Thu, 16 Nov 2023 05:33:13 GMT, David Holmes wrote: >> Xiaohong Gong has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains five additional >>

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-15 Thread David Holmes
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-15 Thread David Holmes
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on