marcoabreu commented on a change in pull request #10760: [MXNET-372] Add build 
flag for USE_F16C in CMake and clarify flag in make
URL: https://github.com/apache/incubator-mxnet/pull/10760#discussion_r185165909
 
 

 ##########
 File path: CMakeLists.txt
 ##########
 @@ -102,6 +105,29 @@ else(MSVC)
   else()
     set(SUPPORT_MSSE2 FALSE)
   endif()
+  # For cross complication, turn off flag if target device does not support it
+  if(USE_F16C)
+    check_cxx_compiler_flag("-mf16c"     COMPILER_SUPPORT_MF16C)
+    if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+      execute_process(COMMAND cat /proc/cpuinfo
+              COMMAND grep flags
+              COMMAND grep f16c
+              OUTPUT_VARIABLE CPU_SUPPORT_F16C)
+    elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+      execute_process(COMMAND sysctl -a
+              COMMAND grep machdep.cpu.features
+              COMMAND grep F16C
+              OUTPUT_VARIABLE CPU_SUPPORT_F16C)
+    endif()
+    if(NOT CPU_SUPPORT_F16C)
 
 Review comment:
   We never set SUPPORT_MF16C explicitely to FALSE

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to