summaryrefslogtreecommitdiff
path: root/doc/release
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2020-06-17 21:35:26 +0300
committerGitHub <noreply@github.com>2020-06-17 21:35:26 +0300
commit8245b392a344a1ae0db6e569ab68b368ad8883c1 (patch)
treee1c5325e8d9114b69e59b3b3ba0cb538fdcbc1e0 /doc/release
parent02883d85b5d3f68c12cb1df75f96e0fed741d4a4 (diff)
parente72653810f470415f4d78c8a9ea874370a526126 (diff)
downloadnumpy-8245b392a344a1ae0db6e569ab68b368ad8883c1.tar.gz
Merge pull request #13516 from seiko2plus/core_improve_infa_build
ENH: enable multi-platform SIMD compiler optimizations
Diffstat (limited to 'doc/release')
-rw-r--r--doc/release/upcoming_changes/13516.improvement.rst47
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/13516.improvement.rst b/doc/release/upcoming_changes/13516.improvement.rst
new file mode 100644
index 000000000..1b32b61d7
--- /dev/null
+++ b/doc/release/upcoming_changes/13516.improvement.rst
@@ -0,0 +1,47 @@
+Enable multi-platform SIMD compiler optimizations
+-------------------------------------------------
+
+A series of improvements for NumPy infrastructure to pave the way to
+**NEP-38**, that can be summarized as follow:
+
+- **New Build Arguments** :
+
+ - ``--cpu-baseline`` to specify the minimal set of required
+ optimizations, default value is ``min`` which provides the minimum
+ CPU features that can safely run on a wide range of users
+ platforms.
+
+ - ``--cpu-dispatch`` to specify the dispatched set of additional
+ optimizations, default value is ``max -xop -fma4`` which enables
+ all CPU features, except for AMD legacy features.
+
+ - ``--disable-optimization`` to explicitly disable the whole new
+ improvements, It also adds a new **C** compiler #definition
+ called ``NPY_DISABLE_OPTIMIZATION`` which it can be used as
+ guard for any SIMD code.
+
+- **Advanced CPU dispatcher**: A flexible cross-architecture CPU dispatcher built
+ on the top of Python/Numpy distutils, support all common compilers with a wide range of CPU features.
+
+ The new dispatcher requires a special file extension ``*.dispatch.c`` to mark the dispatch-able
+ **C** sources. These sources have the ability to be compiled multiple times so that each compilation process
+ represents certain CPU features and provides different #definitions and flags that affect the code paths.
+
+- **New auto-generated C header ``core/src/common/_cpu_dispatch.h``**
+ This header is generated by the distutils module 'ccompiler_opt', and contains all the #definitions
+ and headers of instruction sets, that had been configured through command arguments '--cpu-baseline' and '--cpu-dispatch'.
+
+- **New C header ``core/src/common/npy_cpu_dispatch.h``**
+
+ This header contains all utilities that required for the whole CPU dispatching process,
+ it also can be considered as a bridge linking the new infrastructure work with NumPy CPU runtime detection.
+
+- **Add new attributes to NumPy umath module(Python level)**
+
+ - ``__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 the supported CPU features during the run of PytestTester**