Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8309458

AArch64: jdk/incubator/vector tests failing when MaxVectorSize is 128B

XMLWordPrintable

    • aarch64
    • generic

      Hi everyone,

      I notice the following tests failed with `+UnlockExperimentalVMOptions -XX:UseSVE=2` on ARM64 when MaxVectorSize is 128B:
      jdk/incubator/vector/ByteMaxVectorLoadStoreTests.java
      jdk/incubator/vector/ByteMaxVectorTests.java
      jdk/incubator/vector/VectorMaxConversionTests.java

      Currently there seems to be no hardware with vlength of 1024bit in the real world, but it can be simulated with qemu using `-cpu max,sve1024=on,sve-default-vector-length=128` parameter, and the problem does not look related to qemu but rather on any architecture where MaxVectorSize is 128B. And JEP438[1] mentions that arm sve supports 128 to 2048 bits in increments of 128 bits.

      From: Dingli Zhang <dingli@iscas.ac.cn>

      The following parameters can be used to run java with sve1024 on qemu:
      ```
      qemu-aarch64 -cpu max,sve1024=on,sve-default-vector-length=128 \
      <path-to-jdk>/bin/java -version
      ```

      To run jtreg with qemu, we need to wrap it with a prepare_sve.sh[2] script so that we can run the qemu simulation directly with <path-to-jdk>/bin/java.

      Run the following command to do the wrapping:
      $ bash prepare_sve.sh /home/dingli/jdk/build/linux-aarch64-server-release/jdk

      Run jtreg test:
      ```
      /home/dingli/jdk-tools/jtreg/bin/jtreg -J-Djavatest.maxOutputSize=500000 \
      -v:default \
      -concurrency:8 -timeout:16 \
      -javaoption:-XX:+UnlockExperimentalVMOptions \
      -javaoption:-XX:UseSVE=2 \
      -jdk:/home/dingli/jdk/build/linux-aarch64-server-release/jdk \
      test/jdk/jdk/incubator/vector/ByteMaxVectorTests.java \
      test/jdk/jdk/jdk/incubator/vector/ByteMaxVectorLoadStoreTests.java \
      test/jdk/jdk/incubator/vector/VectorMaxConversionTests.java
      ```

      The jtr files is as follows:
      https://cr.openjdk.org/~dzhang/ByteMaxVectorLoadStoreTests.jtr
      https://cr.openjdk.org/~dzhang/ByteMaxVectorTests.jtr
      https://cr.openjdk.org/~dzhang/VectorMaxConversionTests_id0.jtr
      https://cr.openjdk.org/~dzhang/VectorMaxConversionTests_id1.jtr

      [1] https://openjdk.org/jeps/438
      [2] https://cr.openjdk.org/~dzhang/prepare_sve.sh

      Best regards,
      Dingli

            Unassigned Unassigned
            aph Andrew Haley
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: