Skip to content

Commit

Permalink
enable AVX2 on faiss_test
Browse files Browse the repository at this point in the history
  • Loading branch information
wx257osn2 committed Jul 19, 2022
1 parent 95cdc29 commit 8995987
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ set(FAISS_TEST_SRC
add_executable(faiss_test ${FAISS_TEST_SRC})

if(FAISS_OPT_LEVEL STREQUAL "avx2")
if(NOT WIN32)
target_compile_options(faiss_test PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-mavx2 -mfma>)
else()
target_compile_options(faiss_test PRIVATE $<$<COMPILE_LANGUAGE:CXX>:/arch:AVX2>)
endif()
target_link_libraries(faiss_test PRIVATE faiss_avx2)
else()
target_link_libraries(faiss_test PRIVATE faiss)
Expand Down

0 comments on commit 8995987

Please sign in to comment.