[GitHub] [arrow] jianxind commented on a change in pull request #8071: ARROW-9877: [C++] Fix homebrew-cpp build fail on AVX512

2020-08-28 Thread GitBox


jianxind commented on a change in pull request #8071:
URL: https://github.com/apache/arrow/pull/8071#discussion_r478941556



##
File path: cpp/src/arrow/util/cpu_info.h
##
@@ -71,8 +78,8 @@ class ARROW_EXPORT CpuInfo {
   /// Returns all the flags for this cpu
   int64_t hardware_flags();
 
-  /// Returns whether of not the cpu supports this flag
-  bool IsSupported(int64_t flag) const { return (hardware_flags_ & flag) != 0; 
}
+  /// Returns whether of not the cpu supports the flags

Review comment:
   done





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [arrow] jianxind commented on a change in pull request #8071: ARROW-9877: [C++] Fix homebrew-cpp build fail on AVX512

2020-08-28 Thread GitBox


jianxind commented on a change in pull request #8071:
URL: https://github.com/apache/arrow/pull/8071#discussion_r478897639



##
File path: cpp/cmake_modules/SetupCxxFlags.cmake
##
@@ -47,8 +47,8 @@ if(ARROW_CPU_FLAG STREQUAL "x86")
   else()
 set(ARROW_SSE4_2_FLAG "-msse4.2")
 set(ARROW_AVX2_FLAG "-mavx2")
-# skylake-avx512 consists of AVX512F,AVX512BW,AVX512VL,AVX512CD,AVX512DQ
-set(ARROW_AVX512_FLAG "-march=skylake-avx512 -mbmi2")
+# Typical AVX512 subsets consists of AVX512F, AVX512BW, AVX512VL, 
AVX512CD, AVX512DQ
+set(ARROW_AVX512_FLAG "-mavx512f -mavx512cd -mavx512vl -mavx512dq 
-mavx512bw -mbmi2")

Review comment:
   Yes. Most build use "-march=haswell" for AVX2, "-march=skylake-avx512" 
for AVX512.
   
   Thus we has to use "-mavx512f -mavx512cd -mavx512vl -mavx512dq -mavx512bw 
-march=skylake-avx512" for this issue, a little duplicated...





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org