summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSayed Adel <seiko@imavr.com>2020-06-16 18:41:16 +0200
committerSayed Adel <seiko@imavr.com>2020-06-16 18:44:36 +0200
commite72653810f470415f4d78c8a9ea874370a526126 (patch)
tree64e35b2bba77ede5431422d593703a9236f49865
parent86d25150c03fcddad5b0446342e2b55b38194053 (diff)
downloadnumpy-e72653810f470415f4d78c8a9ea874370a526126.tar.gz
DOC: add a release note
-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**