diff options
author | Sayed Adel <seiko@imavr.com> | 2020-06-13 18:15:49 +0200 |
---|---|---|
committer | Sayed Adel <seiko@imavr.com> | 2020-06-16 18:42:02 +0200 |
commit | 1bd0a621b56ff82f642c4e1f3ef4f05723a6a22a (patch) | |
tree | 4cb0a530e700bf5611946e1983dedba7e2d4b439 /numpy/_pytesttester.py | |
parent | 524664e5684ae03a845f3a3dff8360ee82aa7e4d (diff) | |
download | numpy-1bd0a621b56ff82f642c4e1f3ef4f05723a6a22a.tar.gz |
ENH: [6/7] enable multi-platform SIMD compiler optimizations
- Add new attributes to umath module
* __cpu_baseline__ a list contains the minimal set of required optimizations
that supported by the compiler and platform according to the specified
values to command argument '--cpu-baseline'.
* __cpu_dispatch__ a list contains the dispatched set of additional optimizations
that supported by the compiler and platform according to the specified
values to command argument '--cpu-dispatch'
- Print required and additional optimizations during the run of PytestTester
Diffstat (limited to 'numpy/_pytesttester.py')
-rw-r--r-- | numpy/_pytesttester.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/numpy/_pytesttester.py b/numpy/_pytesttester.py index ca86aeb22..1c32367f3 100644 --- a/numpy/_pytesttester.py +++ b/numpy/_pytesttester.py @@ -35,12 +35,27 @@ __all__ = ['PytestTester'] def _show_numpy_info(): + from numpy.core._multiarray_umath import ( + __cpu_features__, __cpu_baseline__, __cpu_dispatch__ + ) import numpy as np print("NumPy version %s" % np.__version__) relaxed_strides = np.ones((10, 1), order="C").flags.f_contiguous print("NumPy relaxed strides checking option:", relaxed_strides) + if len(__cpu_baseline__) == 0 and len(__cpu_dispatch__) == 0: + enabled_features = "nothing enabled" + else: + enabled_features = ' '.join(__cpu_baseline__) + for feature in __cpu_dispatch__: + if __cpu_features__[feature]: + enabled_features += " %s*" % feature + else: + enabled_features += " %s?" % feature + print("NumPy CPU features:", enabled_features) + + class PytestTester: """ |