Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions 3rdparty/embree/embree.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,31 @@ elseif(LINUX_AARCH64)
)
set(ISA_LIBS "")
set(ISA_BUILD_BYPRODUCTS "")
elseif(LINUX_X86_64)
execute_process(COMMAND lscpu | grep -i flags | grep -i avx OUTPUT_VARIABLE HAS_AVX)
if(HAS_AVX)
set(ISA_ARGS -DEMBREE_ISA_AVX=ON
-DEMBREE_ISA_AVX2=ON
-DEMBREE_ISA_AVX512=OFF
-DEMBREE_ISA_SSE2=OFF
-DEMBREE_ISA_SSE42=OFF
)
# order matters. link libs with increasing ISA order.
set(ISA_LIBS embree_avx embree_avx2)
set(ISA_BUILD_BYPRODUCTS "<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}embree_avx${CMAKE_STATIC_LIBRARY_SUFFIX}"
"<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}embree_avx2${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
else()
set(ISA_ARGS -DEMBREE_ISA_AVX=OFF
-DEMBREE_ISA_AVX2=OFF
-DEMBREE_ISA_AVX512=OFF
-DEMBREE_ISA_SSE2=ON
-DEMBREE_ISA_SSE42=ON
)
# order matters. link libs with increasing ISA order.
set(ISA_LIBS embree_sse42)
set(ISA_BUILD_BYPRODUCTS "<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}embree_sse42${CMAKE_STATIC_LIBRARY_SUFFIX}" )
endif()
else() # Linux(x86) and WIN32
set(ISA_ARGS -DEMBREE_ISA_AVX=ON
-DEMBREE_ISA_AVX2=ON
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
- Fix CMake configuration summary incorrectly reporting `no` for system BLAS. (PR #7230)
- Add error handling for insufficient correspondences in AdvancedMatching (PR #7234)
- Exposed `get_plotly_fig` and modified `draw_plotly` to return the `Figure` it creates. (PR #7258)
- Fix Illegal instruction (core dumped) on linux system's without AVX #7308
- Fix build with librealsense v2.44.0 and upcoming VS 2022 17.13 (PR #7074)

## 0.13
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if(UNIX AND NOT APPLE)
)
if(PROCESSOR_ARCH STREQUAL "aarch64")
set(LINUX_AARCH64 TRUE)
elseif(PROCESSOR_ARCH STREQUAL "x86_64")
set(LINUX_X86_64 TRUE)
endif()
endif()
if(APPLE)
Expand Down