Which generation of s390x CPU and how to change it?
![](https://secure.gravatar.com/avatar/d3a20bec8951854eb1db68a111438a2a.jpg?s=120&d=mm&r=g)
Hello, As a maintainer of Python packages for openSUSE/SUSE, I would like to ask for help with our bug https://bugzilla.suse.com/1221902. It seems to us that the latest version of NumPy suddenly requires z15 CPU generation, although it used to be OK with z13+ before, and unfortunately that is the level of the CPU support we standardize in openSUSE. Is it true? If so, when this change happened and why? How could we push numpy to work with older processors? Is there anything more to do than just switch of particular features in `--cpu-dispatch`? Thank you for any reply, Matěj Cepl -- http://matej.ceplovi.cz/blog/, @mcepl@floss.social GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 I was quite depressed two weeks ago when I spent an afternoon at Brentano's Bookshop in New York and was looking at the kind of books most people read. Once you see that you lose all hope. -- Friedrich August von Hayek
![](https://secure.gravatar.com/avatar/5f88830d19f9c83e2ddfd913496c5025.jpg?s=120&d=mm&r=g)
On Mon, Mar 25, 2024 at 2:24 PM Matěj Cepl <mcepl@cepl.eu> wrote:
I think that is true. https://numpy.org/neps/nep-0054-simd-cpp-highway.html#supported-features-tar... mentions support for Z14/Z15, and https://github.com/numpy/numpy/pull/25563#issuecomment-1889798367 touches on Z14 support having an issue. So I think Z14 is the minimum.
Is there anything more to do than just switch of particular features in `--cpu-dispatch`?
I suspect not, assuming that that works. If Z13 support is an important use case where the performance difference matters a lot, maybe you can bring up getting partial or even full support back in NumPy. Most NumPy maintainers won't know much/anything about s390x though, so that may require contributions and be nontrivial. Another, more feasible option would be to auto-disable the SIMD features, emit a warning, and then continue rather than fail the NumPy build on Z13 by default. Cheers, Ralf
![](https://secure.gravatar.com/avatar/d3a20bec8951854eb1db68a111438a2a.jpg?s=120&d=mm&r=g)
On Mon Mar 25, 2024 at 4:47 PM CET, Ralf Gommers wrote:
My colleague Fabian Vogt made a deep debug and found this (see ): # I found that the test failure here was also # excluded on 32bit ARM and I dug a bit further: # https://github.com/numpy/numpy/issues/24548 shows the same reason # as here. That's when I also noticed the additional info at the # bottom: # # feats = 'VXE, None' # # At first I wasn't able to reproduce it on armv7 because cpu # feature detection was broken, which nobody noticed... I debugged # that and fixed it with https://github.com/numpy/meson/pull/12. # # After fixing that, I was able to reproduce the test # failure locally by using NPY_ENABLE_CPU_FEATURES="ASIMDHP, # None". This wasn't meant to succeed but it did. Fixed with # https://github.com/numpy/numpy/pull/26151. # # Both submitted as # https://build.opensuse.org/request/show/1163337 Best, Matěj -- http://matej.ceplovi.cz/blog/, @mcepl@floss.social GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 When God put a calling on your life, He already factored in your stupidity. -- Unknown, mentioned in a sermon
![](https://secure.gravatar.com/avatar/5f88830d19f9c83e2ddfd913496c5025.jpg?s=120&d=mm&r=g)
On Mon, Mar 25, 2024 at 2:24 PM Matěj Cepl <mcepl@cepl.eu> wrote:
I think that is true. https://numpy.org/neps/nep-0054-simd-cpp-highway.html#supported-features-tar... mentions support for Z14/Z15, and https://github.com/numpy/numpy/pull/25563#issuecomment-1889798367 touches on Z14 support having an issue. So I think Z14 is the minimum.
Is there anything more to do than just switch of particular features in `--cpu-dispatch`?
I suspect not, assuming that that works. If Z13 support is an important use case where the performance difference matters a lot, maybe you can bring up getting partial or even full support back in NumPy. Most NumPy maintainers won't know much/anything about s390x though, so that may require contributions and be nontrivial. Another, more feasible option would be to auto-disable the SIMD features, emit a warning, and then continue rather than fail the NumPy build on Z13 by default. Cheers, Ralf
![](https://secure.gravatar.com/avatar/d3a20bec8951854eb1db68a111438a2a.jpg?s=120&d=mm&r=g)
On Mon Mar 25, 2024 at 4:47 PM CET, Ralf Gommers wrote:
My colleague Fabian Vogt made a deep debug and found this (see ): # I found that the test failure here was also # excluded on 32bit ARM and I dug a bit further: # https://github.com/numpy/numpy/issues/24548 shows the same reason # as here. That's when I also noticed the additional info at the # bottom: # # feats = 'VXE, None' # # At first I wasn't able to reproduce it on armv7 because cpu # feature detection was broken, which nobody noticed... I debugged # that and fixed it with https://github.com/numpy/meson/pull/12. # # After fixing that, I was able to reproduce the test # failure locally by using NPY_ENABLE_CPU_FEATURES="ASIMDHP, # None". This wasn't meant to succeed but it did. Fixed with # https://github.com/numpy/numpy/pull/26151. # # Both submitted as # https://build.opensuse.org/request/show/1163337 Best, Matěj -- http://matej.ceplovi.cz/blog/, @mcepl@floss.social GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 When God put a calling on your life, He already factored in your stupidity. -- Unknown, mentioned in a sermon
participants (2)
-
Matěj Cepl
-
Ralf Gommers