From 9165d24780bc8bf4e0c235ddc67ebe476302dbee Mon Sep 17 00:00:00 2001 From: tannevaled Date: Mon, 26 Oct 2026 12:43:50 +0100 Subject: [PATCH 1/2] ci: run the s390x lane on qemu's max CPU and require VXE Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 4 +++- internal/kernels/vxe_required_s390x_test.go | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 internal/kernels/vxe_required_s390x_test.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 496e710..1f5f8cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,7 +126,9 @@ jobs: # not report LASX fail the lane (TestLASXWhenRequired). - { goarch: loong64, qemu: qemu-loongarch64-static, cpu: "la464", require: NDARRAY_REQUIRE_LASX } - { goarch: ppc64le, qemu: qemu-ppc64le-static } - - { goarch: s390x, qemu: qemu-s390x-static } + # max includes z14's vector enhancements (VXE), which the float32 + # kernels need; NDARRAY_REQUIRE_VXE fails the lane without them. + - { goarch: s390x, qemu: qemu-s390x-static, cpu: "max", require: NDARRAY_REQUIRE_VXE } # 32-bit: int is 32 bits, so shape/size overflow paths differ. - { goarch: arm, qemu: qemu-arm-static } steps: diff --git a/internal/kernels/vxe_required_s390x_test.go b/internal/kernels/vxe_required_s390x_test.go new file mode 100644 index 0000000..7fd8bf6 --- /dev/null +++ b/internal/kernels/vxe_required_s390x_test.go @@ -0,0 +1,17 @@ +package kernels + +import ( + "os" + "testing" +) + +// TestVXEWhenRequired fails when NDARRAY_REQUIRE_VXE is set and the CPU does +// not report the vector facility and its enhancements (z14). CI sets it on the +// s390x qemu lane, so the VX and VXE kernels (the float32 ones need z14) +// cannot go untested behind a green tick there. +func TestVXEWhenRequired(t *testing.T) { + t.Logf("useVX = %v, useVXE = %v", useVX, useVXE) + if os.Getenv("NDARRAY_REQUIRE_VXE") != "" && !(useVX && useVXE) { + t.Fatal("NDARRAY_REQUIRE_VXE is set but the CPU does not report VX and VXE: the vector kernels did not all run") + } +} From 8edd23a5ffdc4f955219281fb096439562c40ac7 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Mon, 26 Oct 2026 12:55:03 +0100 Subject: [PATCH 2/2] ci: the s390x lane runs VX and VXE; update the comments Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f5f8cc..3c9cce0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,10 +43,11 @@ permissions: # amd64/arm64/ppc64le/loong64 ship SIMD kernels (ppc64le's and loong64's were # also run on real POWER8/POWER9 and a Loongson 3C5000L); riscv64 ships RVV # kernels (used when the CPU reports V) and s390x vector-facility kernels (used -# when AT_HWCAP reports it). Under qemu the riscv64 lane runs with V and the -# loong64 lane on la464 (LSX+LASX), and each FAILS if its CPU does not report -# the extension (NDARRAY_REQUIRE_RVV / _LASX): until 2026-10-26 both lanes ran -# qemu's default CPUs and so only ever tested the scalar fallbacks. +# when AT_HWCAP reports it). Under qemu the riscv64 lane runs with V, the +# loong64 lane on la464 (LSX+LASX) and the s390x lane on max (VX+VXE), and each +# FAILS if its CPU does not report the extension (NDARRAY_REQUIRE_RVV / _LASX / +# _VXE): until 2026-10-26 they ran qemu's default CPUs, and the riscv64 and +# loong64 lanes only ever tested the scalar fallbacks. jobs: test: name: test (${{ matrix.os }}) @@ -108,9 +109,9 @@ jobs: # qemu-user execution for the targets without a hosted runner, plus 32-bit # arm. It runs their SIMD kernels where qemu emulates the extension: RVV on - # riscv64, LSX/LASX on loong64, VSX on ppc64le, and the vector facility on - # s390x (when the emulated CPU reports it). It is also the endianness and - # word-size guard. + # riscv64, LSX/LASX on loong64, VSX on ppc64le, and the vector facility with + # its z14 enhancements on s390x. It is also the endianness and word-size + # guard. arch-qemu: name: arch ${{ matrix.goarch }} (qemu) runs-on: ubuntu-latest