Skip to content
Snippets Groups Projects
Verified Commit c904f629 authored by Lars Bilke's avatar Lars Bilke
Browse files

[cmake] Removed option OGS_ENABLE_AVX2.

parent 65447775
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,6 @@ set(CMAKE_LIBRARY_SEARCH_PATH "" ...@@ -28,7 +28,6 @@ set(CMAKE_LIBRARY_SEARCH_PATH ""
set(OGS_CPU_ARCHITECTURE "native" CACHE STRING "Processor architecture, \ set(OGS_CPU_ARCHITECTURE "native" CACHE STRING "Processor architecture, \
defaults to native (*nix) / blend (MSVC)." defaults to native (*nix) / blend (MSVC)."
) )
option(OGS_ENABLE_AVX2 "Enable the use of AVX2 instructions" OFF)
option(OGS_USE_CONAN "Should Conan package manager be used?" ON) option(OGS_USE_CONAN "Should Conan package manager be used?" ON)
set(OGS_CONAN_BUILD "missing" CACHE STRING "Possible values: all, missing, \ set(OGS_CONAN_BUILD "missing" CACHE STRING "Possible values: all, missing, \
never or list of libs to build" never or list of libs to build"
......
...@@ -71,9 +71,7 @@ if(COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL) ...@@ -71,9 +71,7 @@ if(COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL)
add_compile_options(${PROFILE_ARGS}) add_compile_options(${PROFILE_ARGS})
endif() endif()
if(OGS_ENABLE_AVX2) if(OGS_CPU_ARCHITECTURE STREQUAL "generic")
set(CPU_FLAGS -mavx2 -march=core-avx2)
elseif(OGS_CPU_ARCHITECTURE STREQUAL "generic")
set(CPU_FLAGS -mtune=generic) set(CPU_FLAGS -mtune=generic)
elseif(NOT APPLE_ARM AND OGS_CPU_ARCHITECTURE) elseif(NOT APPLE_ARM AND OGS_CPU_ARCHITECTURE)
set(CPU_FLAGS -march=${OGS_CPU_ARCHITECTURE}) set(CPU_FLAGS -march=${OGS_CPU_ARCHITECTURE})
...@@ -152,9 +150,6 @@ if(MSVC) ...@@ -152,9 +150,6 @@ if(MSVC)
else() else()
set(CPU_FLAGS /favor:${OGS_CPU_ARCHITECTURE}) set(CPU_FLAGS /favor:${OGS_CPU_ARCHITECTURE})
endif() endif()
if(OGS_ENABLE_AVX2)
set(CPU_FLAGS ${CPU_FLAGS} /arch:AVX2)
endif()
add_compile_options( add_compile_options(
/MP # multi-core compilation /MP # multi-core compilation
/wd4290 /wd4290
......
...@@ -27,7 +27,6 @@ If a binary runs on a different machine depends on a lot of factors. The followi ...@@ -27,7 +27,6 @@ If a binary runs on a different machine depends on a lot of factors. The followi
### Optimization CMake options ### Optimization CMake options
- `OGS_CPU_ARCHITECTURE`: possible values `AMD64` or `INTEL64` (sets `/favor:{AMD64 | INTEL64}` flag) - `OGS_CPU_ARCHITECTURE`: possible values `AMD64` or `INTEL64` (sets `/favor:{AMD64 | INTEL64}` flag)
- `OGS_ENABLE_AVX2`: boolean (sets `/arch:AVX2` when set to true), requires at least [Intel Haswell or AMD Excavator-based processors](https://msdn.microsoft.com/en-us//library/7t5yh4fd.aspx)
</div> </div>
<div class='linux'> <div class='linux'>
...@@ -45,7 +44,6 @@ If a binary runs on a different machine depends on a lot of factors. The followi ...@@ -45,7 +44,6 @@ If a binary runs on a different machine depends on a lot of factors. The followi
#### For optimization #### For optimization
- `OGS_CPU_ARCHITECTURE`: tot to `native` for best optimization for your current cpu, possible values are [listed here](https://stackoverflow.com/a/25095818/80480), more info on [gcc docs](https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-mtune-15) - `OGS_CPU_ARCHITECTURE`: tot to `native` for best optimization for your current cpu, possible values are [listed here](https://stackoverflow.com/a/25095818/80480), more info on [gcc docs](https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-mtune-15)
- `OGS_ENABLE_AVX2`: boolean (sets `-march=core-avx2` when set to true), requires at least Haswell processors
</div> </div>
<div class='mac'> <div class='mac'>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment