wjones127 commented on code in PR #40374:
URL: https://github.com/apache/arrow/pull/40374#discussion_r1513400339


##########
docs/source/cpp/env_vars.rst:
##########
@@ -148,19 +152,27 @@ that changing their value later will have an effect.
    platforms currently do not implement any form of runtime dispatch.
 
    .. note::
-      In addition to runtime dispatch, the compile-time SIMD level can
-      be set using the ``ARROW_SIMD_LEVEL`` CMake configuration variable.
-      Unlike runtime dispatch, compile-time SIMD optimizations cannot be
-      changed at runtime (for example, if you compile Arrow C++ with AVX512
-      enabled, the resulting binary will only run on AVX512-enabled CPUs).
-      Setting ``ARROW_USER_SIMD_LEVEL=NONE`` prevents the execution of
-      explicit SIMD optimization code, but it does not rule out the execution
-      of compiler generated SIMD instructions.  E.g., on x86_64 platform,
-      Arrow is built with ``ARROW_SIMD_LEVEL=SSE4_2`` by default.  Compiler
-      may generate SSE4.2 instructions from any C/C++ source code.  On legacy
-      x86_64 platforms do not support SSE4.2, Arrow binary may fail with
-      SIGILL (Illegal Instruction).  User must rebuild Arrow and PyArrow from
-      scratch by setting cmake option ``ARROW_SIMD_LEVEL=NONE``.
+      In addition to runtime dispatch, Arrow's build system supports two
+      compile-time CMake variables for controlling SIMD: ``ARROW_SIMD_LEVEL``
+      and ``ARROW_RUNTIME_SIMD_LEVEL``.
+
+      The ``ARROW_SIMD_LEVEL`` variable sets the maximum SIMD level at the
+      compiler level.  Unlike runtime dispatch, compile-time SIMD optimizations

Review Comment:
   For clarity, maybe we should share the mechanism. Also, I think it's more 
appropriate to call this the *minimum* SIMD level, as it is older computers 
that won't support this.
   ```suggestion
         The ``ARROW_SIMD_LEVEL`` variable sets the minimum supported SIMD 
level at the
         compiler level. This works by passing the appropriate target 
architecture flag, such as ``-march=haswell`` for AVX2, to the compiler.  
Unlike runtime dispatch, compile-time SIMD optimizations
   ```
   
   
https://github.com/apache/arrow/blob/3d467ac7bfae03cf2db09807054c5672e1959aec/cpp/cmake_modules/SetupCxxFlags.cmake#L47-L67



##########
docs/source/cpp/env_vars.rst:
##########
@@ -148,19 +152,27 @@ that changing their value later will have an effect.
    platforms currently do not implement any form of runtime dispatch.
 
    .. note::
-      In addition to runtime dispatch, the compile-time SIMD level can
-      be set using the ``ARROW_SIMD_LEVEL`` CMake configuration variable.
-      Unlike runtime dispatch, compile-time SIMD optimizations cannot be
-      changed at runtime (for example, if you compile Arrow C++ with AVX512
-      enabled, the resulting binary will only run on AVX512-enabled CPUs).
-      Setting ``ARROW_USER_SIMD_LEVEL=NONE`` prevents the execution of
-      explicit SIMD optimization code, but it does not rule out the execution
-      of compiler generated SIMD instructions.  E.g., on x86_64 platform,
-      Arrow is built with ``ARROW_SIMD_LEVEL=SSE4_2`` by default.  Compiler
-      may generate SSE4.2 instructions from any C/C++ source code.  On legacy
-      x86_64 platforms do not support SSE4.2, Arrow binary may fail with
-      SIGILL (Illegal Instruction).  User must rebuild Arrow and PyArrow from
-      scratch by setting cmake option ``ARROW_SIMD_LEVEL=NONE``.
+      In addition to runtime dispatch, Arrow's build system supports two
+      compile-time CMake variables for controlling SIMD: ``ARROW_SIMD_LEVEL``
+      and ``ARROW_RUNTIME_SIMD_LEVEL``.
+
+      The ``ARROW_SIMD_LEVEL`` variable sets the maximum SIMD level at the
+      compiler level.  Unlike runtime dispatch, compile-time SIMD optimizations
+      cannot be changed at runtime (for example, if you compile Arrow C++ with
+      AVX512 enabled, the resulting binary will only run on AVX512-enabled
+      CPUs).  Setting ``ARROW_USER_SIMD_LEVEL=NONE`` prevents the execution of

Review Comment:
   ```suggestion
         cannot be changed at runtime. For example, if you compile Arrow C++ 
with
         AVX512 enabled, the resulting binary will only run on AVX512-enabled
         CPUs.  Setting ``ARROW_USER_SIMD_LEVEL=NONE`` prevents the execution of
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to