Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v12]

2025-04-24 Thread Vladimir Ivanov
On Thu, 24 Apr 2025 11:33:43 GMT, Hamlin Li wrote: >> FTR both `VectorSupport.getMaxLaneCount()` and `CPUFeatures` don't rely on >> raw list of ISA extensions CPU supports, but only those reported by the JVM. >> So, if some feature support is disabled on JVM side, it won't be reported by >> `

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v12]

2025-04-24 Thread Hamlin Li
On Wed, 23 Apr 2025 23:55:50 GMT, Vladimir Ivanov wrote: >> Does the following check catch `UseRVV == false` case on RISC-V? >> >> public boolean isSupported(Operator op, VectorSpecies vspecies) { >> ... >> int maxLaneCount = >> VectorSupport.getMaxLaneCount(vspecies.elementType())

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v12]

2025-04-23 Thread Vladimir Ivanov
On Wed, 23 Apr 2025 18:11:42 GMT, Vladimir Ivanov wrote: >> In previous code, we use `UseRVV` to detect if rvv extension is supported. >> >> On the other hand, user can choose to disable UseRVV if they want even if >> rvv extension is supported on the running machine. In this sense, there >> c

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v12]

2025-04-23 Thread Vladimir Ivanov
On Wed, 23 Apr 2025 08:43:47 GMT, Hamlin Li wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMathLibrary.java >> line 288: >> >>> 286: IntFunction> >>> implSupplier, >>> 287: V v) { >>> 288: var entry = lookup(op, opc, vspe

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v12]

2025-04-23 Thread Hamlin Li
On Wed, 23 Apr 2025 08:40:44 GMT, Hamlin Li wrote: >> Vladimir Ivanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Avoid thread state transition in VectorSupport_GetCPUFeatures > > src/jdk.incubator.vector/share/classes/jdk/incubator/

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v12]

2025-04-23 Thread Hamlin Li
On Wed, 23 Apr 2025 01:02:19 GMT, Vladimir Ivanov wrote: >> Migrate Vector API math library (SVML and SLEEF) linkage from native code >> (in JVM) to Java FFM API. >> >> Since FFM API doesn't support vector calling conventions yet, migration >> affects only symbol lookup for now. But it still e

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v12]

2025-04-22 Thread Vladimir Ivanov
> Migrate Vector API math library (SVML and SLEEF) linkage from native code (in > JVM) to Java FFM API. > > Since FFM API doesn't support vector calling conventions yet, migration > affects only symbol lookup for now. But it still enables significant > simplifications on JVM side. > > The patc