diff --git a/doc/release/upcoming_changes/21468.new_feature.rst b/doc/release/upcoming_changes/21468.new_feature.rst new file mode 100644 index 000000000000..4d4a47657f31 --- /dev/null +++ b/doc/release/upcoming_changes/21468.new_feature.rst @@ -0,0 +1,60 @@ +New function `np.show_runtime` +------------------------------ + +A new function ``np.show_runtime`` has been added to display the runtime +information of the machine in addition to ``np.show_config`` which displays +the build-related information. +This function returns a list of dictionaries as follows:: + + >>> np.show_runtime() + [{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'], + 'found': ['SSSE3', + 'SSE41', + 'POPCNT', + 'SSE42', + 'AVX', + 'F16C', + 'FMA3', + 'AVX2'], + 'not_found': ['AVX512F', + 'AVX512CD', + 'AVX512_KNL', + 'AVX512_KNM', + 'AVX512_SKX', + 'AVX512_CLX', + 'AVX512_CNL', + 'AVX512_ICL']}}, + {'architecture': 'Zen', + 'filepath': '/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so', + 'internal_api': 'openblas', + 'num_threads': 12, + 'prefix': 'libopenblas', + 'threading_layer': 'pthreads', + 'user_api': 'blas', + 'version': '0.3.20'}] + +Note that this function requires `threadpoolctl`_ to function properly. +It would result in the following warning if not installed:: + + >>> np.show_runtime() + WARNING: `threadpoolctl` not found in system! Install it by `pip install threadpoolctl`. Once installed, try `np.show_runtime` again for more detailed build information + [{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'], + 'found': ['SSSE3', + 'SSE41', + 'POPCNT', + 'SSE42', + 'AVX', + 'F16C', + 'FMA3', + 'AVX2'], + 'not_found': ['AVX512F', + 'AVX512CD', + 'AVX512_KNL', + 'AVX512_KNM', + 'AVX512_SKX', + 'AVX512_CLX', + 'AVX512_CNL', + 'AVX512_ICL']}}] + + +.. _threadpoolctl: https://pypi.org/project/threadpoolctl/