-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Fix CI SIMD build on s390x #21750
Conversation
upgrades to Jammy leads to different error: INFO: compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/home/travis/build/numpy/numpy/builds/venv/include -I/opt/python/3.10.4/include/python3.10 -Ibuild/src.linux-s390x-3.10/numpy/core/src/common -Ibuild/src.linux-s390x-3.10/numpy/core/src/npymath -c'
extra options: '-march=arch11 -mzvector -Werror'
WARN: CCompilerOpt.dist_test[630] : CCompilerOpt._dist_test_spawn[764] : Command (gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Werror=vla -Werror=nonnull -Werror=pointer-arith -Werror=implicit-function-declaration -Wlogical-op -Wno-sign-compare -Werror=undef -fPIC -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/home/travis/build/numpy/numpy/builds/venv/include -I/opt/python/3.10.4/include/python3.10 -Ibuild/src.linux-s390x-3.10/numpy/core/src/common -Ibuild/src.linux-s390x-3.10/numpy/core/src/npymath -c /home/travis/build/numpy/numpy/numpy/distutils/checks/cpu_vx.c -o /tmp/tmp4dhgcm3y/home/travis/build/numpy/numpy/numpy/distutils/checks/cpu_vx.o -MMD -MF /tmp/tmp4dhgcm3y/home/travis/build/numpy/numpy/numpy/distutils/checks/cpu_vx.o.d -march=arch11 -mzvector -Werror) failed with exit status 1 output ->
/home/travis/build/numpy/numpy/numpy/distutils/checks/cpu_vx.c: In function ‘main’:
/home/travis/build/numpy/numpy/numpy/distutils/checks/cpu_vx.c:11:5: error: vector argument passed to unprototyped function
x = vec_round(vec_ceil(x) + vec_floor(y));
|
ca8f9e1
to
df408ec
Compare
It was bionic, Travis doesn't provides jammy on s390x |
5c85f5d
to
f800fca
Compare
upgrade the binutils fixes the issue and VX z13 build error can be triggered : build errorloops_comparison.dispatch.c.src: In function ‘simd_binary_equal_b8’:
numpy/core/src/common/simd/vec/operators.h:148:22: error: ‘__builtin_s390_vec_eqv’ requires z14 or higher
148 | #define npyv_xnor_b8 vec_eqv
| ^~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src:236:21: note: in expansion of macro ‘npyv_xnor_b8’
236 | npyv_b8 c = npyv_@VOP@_b8(a, b);
| ^~~~~~~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src: In function ‘simd_binary_scalar1_equal_b8’:
numpy/core/src/common/simd/vec/operators.h:148:22: error: ‘__builtin_s390_vec_eqv’ requires z14 or higher
148 | #define npyv_xnor_b8 vec_eqv
| ^~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src:260:21: note: in expansion of macro ‘npyv_xnor_b8’
260 | npyv_b8 c = npyv_@VOP@_b8(a, b);
| ^~~~~~~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src: In function ‘simd_binary_scalar2_equal_b8’:
numpy/core/src/common/simd/vec/operators.h:148:22: error: ‘__builtin_s390_vec_eqv’ requires z14 or higher
148 | #define npyv_xnor_b8 vec_eqv
| ^~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src:283:21: note: in expansion of macro ‘npyv_xnor_b8’
283 | npyv_b8 c = npyv_@VOP@_b8(a, b);
| ^~~~~~~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src: In function ‘simd_binary_less_equal_b8’:
numpy/core/src/common/simd/vec/operators.h:147:21: error: ‘__builtin_s390_vec_orc’ requires z14 or higher
147 | #define npyv_orc_b8 vec_orc
| ^~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src:236:21: note: in expansion of macro ‘npyv_orc_b8’
236 | npyv_b8 c = npyv_@VOP@_b8(a, b);
| ^~~~~~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src: In function ‘simd_binary_scalar1_less_equal_b8’:
numpy/core/src/common/simd/vec/operators.h:147:21: error: ‘__builtin_s390_vec_orc’ requires z14 or higher
147 | #define npyv_orc_b8 vec_orc
| ^~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src:260:21: note: in expansion of macro ‘npyv_orc_b8’
260 | npyv_b8 c = npyv_@VOP@_b8(a, b);
| ^~~~~~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src: In function ‘simd_binary_scalar2_less_equal_b8’:
numpy/core/src/common/simd/vec/operators.h:147:21: error: ‘__builtin_s390_vec_orc’ requires z14 or higher
147 | #define npyv_orc_b8 vec_orc
| ^~~~~~~
numpy/core/src/umath/loops_comparison.dispatch.c.src:283:21: note: in expansion of macro ‘npyv_orc_b8’
283 | npyv_b8 c = npyv_@VOP@_b8(a, b); |
f800fca
to
d99a502
Compare
build passed after merges #21748 optimization log########### EXT COMPILER OPTIMIZATION ###########
INFO: Platform :
Architecture: s390x
Compiler : gcc
CPU baseline :
Requested : 'min'
Enabled : none
Flags : none
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : VX VXE VXE2
Generated :
:
VX :
Flags : -march=arch11 -mzvector
Extra checks: none
Detect : VX
: build/src.linux-s390x-3.8/numpy/core/src/multiarray/argfunc.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_unary_fp.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_arithm_fp.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_arithmetic.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_minmax.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_hyperbolic.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_comparison.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/_simd/_simd.dispatch.c
:
VXE : VX
Flags : -mzvector -march=arch12
Extra checks: none
Detect : VXE
: build/src.linux-s390x-3.8/numpy/core/src/multiarray/argfunc.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_unary_fp.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_arithm_fp.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_minmax.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_trigonometric.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_hyperbolic.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_comparison.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/_simd/_simd.dispatch.c
:
VXE2 : VX VXE
Flags : -mzvector -march=arch13
Extra checks: none
Detect : VXE2
: build/src.linux-s390x-3.8/numpy/core/src/umath/loops_trigonometric.dispatch.c
: build/src.linux-s390x-3.8/numpy/core/src/_simd/_simd.dispatch.c
|
@mattip, Any ideas to ask Travis to upgrade their images? the assembler needs to be upgraded to avoid incompatibility with gcc >= 9 |
reported to upstream https://travis-ci.community/t/s390x-upgrades-binutils-package/13083 |
Thanks @seiko2plus |
This guard protects against any sudden unexpected changes that may adversely affect the compile-time SIMD features detection which could leave the SIMD code inactivated. Until now we have faced two cases: 1. Hardening the compile-time test files of Neon/ASIMD features without checking the sanity of the modification leading to disabling all optimizations on aarch64. see numpygh-21747 2. A sudden compiler upgrades by CI side on s390x that causes conflicts with the installed assembler leading to disabling the whole VX/E features, which made us merge SIMD code without testing it. Later, it was discovered that this code disrupted the NumPy build. see numpygh-21750, numpygh-21748
This guard protects against any sudden unexpected changes that may adversely affect the compile-time SIMD features detection which could leave the SIMD code inactivated. Until now we have faced two cases: 1. Hardening the compile-time test files of Neon/ASIMD features without checking the sanity of the modification leading to disabling all optimizations on aarch64. see numpygh-21747 2. A sudden compiler upgrades by CI side on s390x that causes conflicts with the installed assembler leading to disabling the whole VX/E features, which made us merge SIMD code without testing it. Later, it was discovered that this code disrupted the NumPy build. see numpygh-21750, numpygh-21748
This guard protects against any sudden unexpected changes that may adversely affect the compile-time SIMD features detection which could leave the SIMD code inactivated. Until now we have faced two cases: 1. Hardening the compile-time test files of Neon/ASIMD features without checking the sanity of the modification leading to disabling all optimizations on aarch64. see numpygh-21747 2. A sudden compiler upgrades by CI side on s390x that causes conflicts with the installed assembler leading to disabling the whole VX/E features, which made us merge SIMD code without testing it. Later, it was discovered that this code disrupted the NumPy build. see numpygh-21750, numpygh-21748
On s390x, Travis CI runner fails to build SIMD VX features. The assembler errors seems to be caused due to invalid repo packages or incompatible assembler. the following error looks new, I didn't detect it before so maybe a new update has been made by Travis causes this issue.