Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v7]

2021-03-02 Thread Jie Fu
On Tue, 2 Mar 2021 17:17:37 GMT, Paul Sandoz wrote: >> Jie Fu has updated the pull request incrementally with one additional commit >> since the last revision: >> >> Add VectorShape.getMaxVectorBitSize > > Marked as reviewed by psandoz (Reviewer). > The `PreferredSpeciesTest` also needs to b

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v7]

2021-03-02 Thread Paul Sandoz
On Tue, 2 Mar 2021 02:11:08 GMT, Jie Fu wrote: >> Hi all, >> >> Vector API fails to work when: >> - case 1: MaxVectorSize is set to <=8, or >> - case 2: C2 is disabled >> >> The reason is that {max/preferred} VectorShape initialization fails in both >> cases. >> And the root cause is that Ve

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception

2021-03-02 Thread Paul Sandoz
On Thu, 25 Feb 2021 09:31:01 GMT, Jie Fu wrote: > Hi all, > > Vector API fails to work when: > - case 1: MaxVectorSize is set to <=8, or > - case 2: C2 is disabled > > The reason is that {max/preferred} VectorShape initialization fails in both > cases. > And the root cause is that VectorSupp

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v5]

2021-03-01 Thread Jie Fu
On Sun, 28 Feb 2021 13:31:38 GMT, Jie Fu wrote: >> `@requires vm.compiler2.enabled` had been added. >> Thanks. > > @PaulSandoz , are you also OK with the latest version? > Thanks. > @DamonFool I think Vladimir is correct in the layering, in this respect i > think we can make things a littler cl

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v7]

2021-03-01 Thread Jie Fu
> Hi all, > > Vector API fails to work when: > - case 1: MaxVectorSize is set to <=8, or > - case 2: C2 is disabled > > The reason is that {max/preferred} VectorShape initialization fails in both > cases. > And the root cause is that VectorSupport_GetMaxLaneCount [1] returns > unreasonable va

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v5]

2021-03-01 Thread Paul Sandoz
On Sun, 28 Feb 2021 13:31:38 GMT, Jie Fu wrote: >> `@requires vm.compiler2.enabled` had been added. >> Thanks. > > @PaulSandoz , are you also OK with the latest version? > Thanks. @DamonFool I think Vladimir is correct in the layering, in this respect i think we can make things a littler cleare

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v5]

2021-02-28 Thread Jie Fu
On Sat, 27 Feb 2021 11:15:06 GMT, Jie Fu wrote: >> test/jdk/jdk/incubator/vector/PreferredSpeciesTest.java line 42: >> >>> 40: * @modules jdk.incubator.vector java.base/jdk.internal.vm.vector >>> 41: * @run testng/othervm -XX:MaxVectorSize=8 PreferredSpeciesTest >>> 42: * @run testng/othervm

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v6]

2021-02-27 Thread Jie Fu
> Hi all, > > Vector API fails to work when: > - case 1: MaxVectorSize is set to <=8, or > - case 2: C2 is disabled > > The reason is that {max/preferred} VectorShape initialization fails in both > cases. > And the root cause is that VectorSupport_GetMaxLaneCount [1] returns > unreasonable va

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v5]

2021-02-27 Thread Jie Fu
On Sat, 27 Feb 2021 10:58:16 GMT, Vladimir Ivanov wrote: >> Jie Fu 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 seven additional commits >> s

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v5]

2021-02-27 Thread Vladimir Ivanov
On Sat, 27 Feb 2021 03:23:12 GMT, Jie Fu wrote: >> Hi all, >> >> Vector API fails to work when: >> - case 1: MaxVectorSize is set to <=8, or >> - case 2: C2 is disabled >> >> The reason is that {max/preferred} VectorShape initialization fails in both >> cases. >> And the root cause is that V

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v4]

2021-02-26 Thread Jie Fu
On Fri, 26 Feb 2021 15:48:18 GMT, Vladimir Ivanov wrote: > > I'd like to keep DoubleVector.SPECIES_PREFERRED.length() <= > > VectorSupport.getMaxLaneCount(double.class) for Java programmers since the > > VectorSupport_GetMaxLaneCount is used to implement a Java API. > > It doesn't make much se

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v5]

2021-02-26 Thread Jie Fu
> Hi all, > > Vector API fails to work when: > - case 1: MaxVectorSize is set to <=8, or > - case 2: C2 is disabled > > The reason is that {max/preferred} VectorShape initialization fails in both > cases. > And the root cause is that VectorSupport_GetMaxLaneCount [1] returns > unreasonable va

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v4]

2021-02-26 Thread Vladimir Ivanov
On Fri, 26 Feb 2021 15:37:08 GMT, Jie Fu wrote: > I'd like to keep DoubleVector.SPECIES_PREFERRED.length() <= > VectorSupport.getMaxLaneCount(double.class) for Java programmers since the > VectorSupport_GetMaxLaneCount is used to implement a Java API. It doesn't make much sense to me. `VectorS

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v4]

2021-02-26 Thread Jie Fu
On Fri, 26 Feb 2021 13:55:15 GMT, Vladimir Ivanov wrote: > IMO the fix should be in > `src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorShape.java`. > > JVM does the right job when it signals vector support is absent (by returning > `-1`). > > `jdk.incubator.vector` implement

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v4]

2021-02-26 Thread Vladimir Ivanov
On Fri, 26 Feb 2021 02:38:00 GMT, Jie Fu wrote: >> Hi all, >> >> Vector API fails to work when: >> - case 1: MaxVectorSize is set to <=8, or >> - case 2: C2 is disabled >> >> The reason is that {max/preferred} VectorShape initialization fails in both >> cases. >> And the root cause is that V

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v4]

2021-02-25 Thread Paul Sandoz
On Fri, 26 Feb 2021 02:38:00 GMT, Jie Fu wrote: >> Hi all, >> >> Vector API fails to work when: >> - case 1: MaxVectorSize is set to <=8, or >> - case 2: C2 is disabled >> >> The reason is that {max/preferred} VectorShape initialization fails in both >> cases. >> And the root cause is that V

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v4]

2021-02-25 Thread Jie Fu
> Hi all, > > Vector API fails to work when: > - case 1: MaxVectorSize is set to <=8, or > - case 2: C2 is disabled > > The reason is that {max/preferred} VectorShape initialization fails in both > cases. > And the root cause is that VectorSupport_GetMaxLaneCount [1] returns > unreasonable va

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v4]

2021-02-25 Thread Jie Fu
On Fri, 26 Feb 2021 02:28:55 GMT, Paul Sandoz wrote: > In that case I think we can remove the execution with > `-XX:TieredStopAtLevel=x`. Fixed. Thanks. - PR: https://git.openjdk.java.net/jdk/pull/2722

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v3]

2021-02-25 Thread Paul Sandoz
On Fri, 26 Feb 2021 02:16:02 GMT, Jie Fu wrote: >> Thanks, was the test `VectorShapeInitTest` passing prior to the fix of the >> numerator? >> Perhaps we should be testing more directly on >> `VectorShape.S_Max_BIT.vectorBitSize()` and `VectorShape.preferredShape` ? >> Also, perhaps we can run

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v3]

2021-02-25 Thread Jie Fu
> Hi all, > > Vector API fails to work when: > - case 1: MaxVectorSize is set to <=8, or > - case 2: C2 is disabled > > The reason is that {max/preferred} VectorShape initialization fails in both > cases. > And the root cause is that VectorSupport_GetMaxLaneCount [1] returns > unreasonable va

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v3]

2021-02-25 Thread Jie Fu
On Fri, 26 Feb 2021 00:30:45 GMT, Paul Sandoz wrote: > Thanks, was the test `VectorShapeInitTest` passing prior to the fix of the > numerator? Yes. It also passed with min_lane_count = 64 / type2aelembytes(bt). > Perhaps we should be testing more directly on > `VectorShape.S_Max_BIT.vectorBitS

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v2]

2021-02-25 Thread Paul Sandoz
On Thu, 25 Feb 2021 23:48:37 GMT, Jie Fu wrote: >> src/hotspot/share/prims/vectorSupport.cpp line 368: >> >>> 366: if (java_lang_Class::is_primitive(mirror)) { >>> 367: BasicType bt = java_lang_Class::primitive_type(mirror); >>> 368: int min_lane_count = 64 / type2aelembytes(bt); >> >

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v2]

2021-02-25 Thread Jie Fu
On Thu, 25 Feb 2021 17:23:11 GMT, Paul Sandoz wrote: >> Jie Fu has updated the pull request incrementally with one additional commit >> since the last revision: >> >> The numerator should be 8 (byte) > > src/hotspot/share/prims/vectorSupport.cpp line 368: > >> 366: if (java_lang_Class::is_

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception [v2]

2021-02-25 Thread Jie Fu
> Hi all, > > Vector API fails to work when: > - case 1: MaxVectorSize is set to <=8, or > - case 2: C2 is disabled > > The reason is that {max/preferred} VectorShape initialization fails in both > cases. > And the root cause is that VectorSupport_GetMaxLaneCount [1] returns > unreasonable va

Re: RFR: 8262096: Vector API fails to work due to VectorShape initialization exception

2021-02-25 Thread Paul Sandoz
On Thu, 25 Feb 2021 09:31:01 GMT, Jie Fu wrote: > Hi all, > > Vector API fails to work when: > - case 1: MaxVectorSize is set to <=8, or > - case 2: C2 is disabled > > The reason is that {max/preferred} VectorShape initialization fails in both > cases. > And the root cause is that VectorSupp