pitrou commented on code in PR #14674:
URL: https://github.com/apache/arrow/pull/14674#discussion_r1060818164


##########
cpp/cmake_modules/SetupCxxFlags.cmake:
##########
@@ -48,22 +48,30 @@ if(ARROW_CPU_FLAG STREQUAL "x86")
     set(ARROW_SSE4_2_FLAG "")
     set(ARROW_AVX2_FLAG "/arch:AVX2")
     set(ARROW_AVX512_FLAG "/arch:AVX512")
+    set(ARROW_AVX512_ICX_FLAG "/arch:AVX512")
     set(CXX_SUPPORTS_SSE4_2 TRUE)
   else()
     set(ARROW_SSE4_2_FLAG "-msse4.2")
     set(ARROW_AVX2_FLAG "-march=haswell")
     # skylake-avx512 consists of AVX512F,AVX512BW,AVX512VL,AVX512CD,AVX512DQ
     set(ARROW_AVX512_FLAG "-march=skylake-avx512 -mbmi2")
+    # icelake-server consists of 
AVX512VBMI,AVX512IFMA,AVX512VBMI2,AVX512VPOPCNTDQ
+    #   AVX512BITALG,AVX512VNN
+    set(ARROW_AVX512_ICX_FLAG "-march=icelake-server -mbmi2")
     # Append the avx2/avx512 subset option also, fix issue ARROW-9877 for 
homebrew-cpp
     set(ARROW_AVX2_FLAG "${ARROW_AVX2_FLAG} -mavx2")
     set(ARROW_AVX512_FLAG
         "${ARROW_AVX512_FLAG} -mavx512f -mavx512cd -mavx512vl -mavx512dq 
-mavx512bw")
+    set(ARROW_AVX512_ICX_FLAG
+        "${ARROW_AVX512_ICX_FLAG} -mavx512ifma -mavx512vbmi -mavx512vnni 
-mavx512vbmi2")
     check_cxx_compiler_flag(${ARROW_SSE4_2_FLAG} CXX_SUPPORTS_SSE4_2)
   endif()
   check_cxx_compiler_flag(${ARROW_AVX2_FLAG} CXX_SUPPORTS_AVX2)
   if(MINGW)
     # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782
     message(STATUS "Disable AVX512 support on MINGW for now")
+  elseif(MSVC)
+    set(CXX_SUPPORTS_AVX512_ICX FALSE)

Review Comment:
   Why this? This disables AVX512 on MSVC as well...



-- 
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