[lworld+vector] RFR: 8311675: [lworld+vector] Max Species support. [v3]
Xiaohong Gong
xgong at openjdk.org
Mon Oct 16 07:25:17 UTC 2023
On Mon, 16 Oct 2023 07:15:14 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/hotspot/cpu/x86/vm_version_x86.cpp line 3257:
>>
>>> 3255: default:
>>> 3256: assert(false, "Unexpected basic type");
>>> 3257: }
>>
>> If the return value is 0, what is the actual number of the multifields in payload? It seems not reasonable for `0`. WDYT?
>
> For x86 this leaf level routine is directly imported from Matcher. _Matcher::max_vector_size_ will query it to get maximum vector size supported by a target. Agree that it needs to be tuned.
>
> BTW I also see a discrepancy b/w lane count and max vector size for MaxSpecies in existing implementation.
>
>
> LPROMPT>cat test_max.java
>
> import jdk.incubator.vector.*;
>
> public class test_max {
> public static void main(String [] args) {
> System.out.println(ByteVector.SPECIES_MAX);
> System.out.println(ByteVector.broadcast(ByteVector.SPECIES_MAX, 1));
> }
> }
> LPROMPT>java -XX:MaxVectorSize=0 --add-modules=jdk.incubator.vector -XX:+PrintFlagsFinal -cp . test_max.java | grep -e "MaxVectorSize" -e "Species" -e "["
> OpenJDK 64-Bit Server VM warning: MaxVectorSize must be at least 4 on this platform
> [Global flags]
> intx MaxVectorSize = 4 {C2 product} {command line}
> WARNING: Using incubator modules: jdk.incubator.vector
> warning: using incubating module(s): jdk.incubator.vector
> 1 warning
> Species[byte, 8, S_Max_BIT]
> [1, 1, 1, 1, 1, 1, 1, 1]
> LPROMPT>
Yes, it seems werid. I think it is because the min operation with 64-bit shape in java code. Please see my following comments.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/931#discussion_r1360219456
More information about the valhalla-dev
mailing list