Skip to content

Commit

Permalink
Fix AVX2 detection on macOS
Browse files Browse the repository at this point in the history
Fix for marian-nmt#880 but currently I'm especially interested in it from a TranslateLocally point of view.
  • Loading branch information
jelmervdl authored Dec 2, 2021
1 parent a284a05 commit c63c2e7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmake/FindSSE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
ENDIF (AVX512_TRUE)

ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
CPUINFO)

EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features machdep.cpu.leaf7_features" OUTPUT_VARIABLE CPUINFO)
STRING(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE ${CPUINFO})
STRING(COMPARE EQUAL "SSE2" "${SSE_THERE}" SSE2_TRUE)
IF (SSE2_TRUE)
Expand Down

0 comments on commit c63c2e7

Please sign in to comment.