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
BUG: Fix for npyv_orc_b8 and npyv_xnor_b8 for s390x (z13) #21748
Conversation
- Implement npyv_orc_b8 and npyv_xnor_b8 for z13. '__builtin_s390_vec_orc' and `__builtin_s390_vec_eqv` require z14 or higher.
I assume you hit this when running on a z13 machine? |
@mattip I have observed the below error while building with from build/src.linux-s390x-3.9/numpy/core/src/umath/loops_comparison.dispatch.vx.c:8:
numpy/core/src/umath/loops_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: 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
| ^~~~~~~ cc @seiko2plus |
my bad, I made re-base after #21483 get merged and CI didn't detect this error!. after checking the CI build log right now, I figure out that VX features aren't detected due to weird assembler error. 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.8.13/include/python3.8 -Ibuild/src.linux-s390x-3.8/numpy/core/src/common -Ibuild/src.linux-s390x-3.8/numpy/core/src/npymath -c /home/travis/build/numpy/numpy/numpy/distutils/checks/cpu_vx.c -o /tmp/tmp8y6c77l0/home/travis/build/numpy/numpy/numpy/distutils/checks/cpu_vx.o -MMD -MF /tmp/tmp8y6c77l0/home/travis/build/numpy/numpy/numpy/distutils/checks/cpu_vx.o.d -march=arch11 -mzvector -Werror) failed with exit status 1 output ->
/tmp/ccnQ53L4.s: Assembler messages:
/tmp/ccnQ53L4.s:19: Error: junk at end of line: `,3'
WARN: CCompilerOpt.feature_test[1563] : testing failed
INFO: CCompilerOpt.__init__[1807] : initialize targets groups
INFO: CCompilerOpt.__init__[1809] : parse target group simd_test
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
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
Since,
__builtin_s390_vec_orc
and__builtin_s390_vec_eqv
require z14 or higher.