projects
/
platform
/
upstream
/
openblas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43c2b0e
)
Add -mavx2 for TARGET=HASWELL if compiler supports and requires it
author
Martin Kroeker
<martin@ruby.chemie.uni-freiburg.de>
Sun, 23 Dec 2018 16:26:09 +0000
(17:26 +0100)
committer
GitHub
<noreply@github.com>
Sun, 23 Dec 2018 16:26:09 +0000
(17:26 +0100)
cmake/system.cmake
patch
|
blob
|
history
diff --git
a/cmake/system.cmake
b/cmake/system.cmake
index
d803bb9
..
ba2c4f3
100644
(file)
--- a/
cmake/system.cmake
+++ b/
cmake/system.cmake
@@
-45,6
+45,12
@@
if (DEFINED TARGET)
if (${TARGET} STREQUAL "SKYLAKEX" AND NOT NO_AVX512)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
endif()
+if (${TARGET} STREQUAL "HASWELL" AND NOT NO_AVX2)
+ execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+ if (${GCC_VERSION} VERSION_GREATER 4.7 OR ${GCC_VERSION} VERSION_EQUAL 4.7)
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
+ endif()
+endif()
endif()
if (DEFINED TARGET)