On Wed, 23 Apr 2025 23:55:50 GMT, Vladimir Ivanov <vliva...@openjdk.org> 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()); >> if (vspecies.length() > maxLaneCount) { >> return false; // lacking vector support >> } >> ... > > 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 > `VM_Version` and, hence, `CPUFeatures`. Thank you for updating! Looks good for riscv. I have ran some basic tests for vector API, passed. I did not ran benchmark, as riscv & aarch64 share the same way to bridge from java to sleef. > Does the following check catch UseRVV == false case on RISC-V? Yes. If you don't mind, an explicit comment might be helpful. As to me "lacking vector support" here means the vector length is not large enough, but it's quite subjective, so you are on the call. > 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 > VM_Version and, hence, CPUFeatures. I'm fine with this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24462#discussion_r2058172975