Commit f3bbdc1d authored by David E. DeMarle's avatar David E. DeMarle

make AVX minimum default instruction set for embree

(cherry picked from commit bc4aa299)
parent a6086da6
set(embree_BUILD_ISA "DEFAULT" CACHE STRING "ISAs to build Embree for")
mark_as_advanced(embree_BUILD_ISA)
#by default, turn off very old and very new SIMD instruction sets
#because they are problematic on our dashboards
set(embree_allow_sse2 "-DEMBREE_ISA_SSE2:BOOL=OFF")
set(embree_allow_sse42 "-DEMBREE_ISA_SSE42:BOOL=OFF")
set(embree_allow_skx "-DEMBREE_ISA_AVX512SKX:BOOL=OFF")
#build the list of SIMD instruction sets we will enable
set(embree_isa_args)
set(embree_allow_skx "-DEMBREE_ISA_AVX512SKX:BOOL=OFF") #default off due to flaky trycompile
if(NOT (embree_BUILD_ISA STREQUAL "DEFAULT"))
if(embree_BUILD_ISA STREQUAL "ALL")
set(embree_BUILD_ISA SSE2 SSE42 AVX AVX2 AVX512KNL AVX512SKX)
......@@ -9,6 +16,12 @@ if(NOT (embree_BUILD_ISA STREQUAL "DEFAULT"))
list(APPEND embree_isa_args -DEMBREE_MAX_ISA:BOOL=NONE)
foreach(isa IN LISTS embree_BUILD_ISA)
list(APPEND embree_isa_args -DEMBREE_ISA_${isa}:BOOL=ON)
if (isa MATCHES "SSE2")
set(embree_allow_sse2)
endif()
if (isa MATCHES "SSE42")
set(embree_allow_sse42)
endif()
if (isa MATCHES "AVX512SKX")
set(embree_allow_skx)
endif()
......@@ -19,6 +32,8 @@ superbuild_add_project(embree
DEPENDS ispc tbb cxx11
CMAKE_ARGS
${embree_isa_args}
${embree_allow_sse2}
${embree_allow_sse42}
${embree_allow_skx}
-DBUILD_TESTING:BOOL=OFF
-DEMBREE_ISPC_EXECUTABLE:PATH=<INSTALL_DIR>/bin/ispc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment