diff options
author | Sebastian Berg <sebastianb@nvidia.com> | 2023-03-06 08:59:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 08:59:44 +0100 |
commit | b4f6b0b9d2af3e5a7ed0bfb51c8d692298bc2dde (patch) | |
tree | 85b6812cc1941e4e724e4e9b1d97fbf5764e74d5 /numpy/testing/_private/utils.py | |
parent | e76c6bca202c46b202a65de4e29698115d882d66 (diff) | |
parent | fccb005a6c995923d47aeda4e71a1d2a4a07f703 (diff) | |
download | numpy-b4f6b0b9d2af3e5a7ed0bfb51c8d692298bc2dde.tar.gz |
Merge pull request #22982 from yamadafuyuka/add_fujitsuccompiler_and_SSL2
ENH: add support for fujitsu C/C++ compiler and SSL2 to numpy.
Diffstat (limited to 'numpy/testing/_private/utils.py')
-rw-r--r-- | numpy/testing/_private/utils.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py index 6ceea5771..b9ea703d0 100644 --- a/numpy/testing/_private/utils.py +++ b/numpy/testing/_private/utils.py @@ -37,7 +37,7 @@ __all__ = [ 'SkipTest', 'KnownFailureException', 'temppath', 'tempdir', 'IS_PYPY', 'HAS_REFCOUNT', "IS_WASM", 'suppress_warnings', 'assert_array_compare', 'assert_no_gc_cycles', 'break_cycles', 'HAS_LAPACK64', 'IS_PYSTON', - '_OLD_PROMOTION', 'IS_MUSL' + '_OLD_PROMOTION', 'IS_MUSL', '_SUPPORTS_SVE' ] @@ -1295,6 +1295,22 @@ def rundocs(filename=None, raise_on_error=True): raise AssertionError("Some doctests failed:\n%s" % "\n".join(msg)) +def check_support_sve(): + """ + gh-22982 + """ + + import subprocess + cmd = 'lscpu' + try: + return "sve" in (subprocess.Popen(cmd, stdout=subprocess.PIPE, + shell=True).communicate()[0]).decode('utf-8') + except OSError: + return False + + +_SUPPORTS_SVE = check_support_sve() + # # assert_raises and assert_raises_regex are taken from unittest. # @@ -2549,3 +2565,4 @@ def _get_glibc_version(): _glibcver = _get_glibc_version() _glibc_older_than = lambda x: (_glibcver != '0.0' and _glibcver < x) + |