missing auto vectorization for AVX512-SPR (#5433)

Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/5433

Fixes https://github.com/facebookresearch/faiss/issues/4511

Reviewed By: alibeklfc

Differential Revision: D112352949

fbshipit-source-id: c13745e4b5e074fa4bd96f6f4133e8551c9a842d
This commit is contained in:
Michael Norris
2026-07-16 11:44:24 -07:00
committed by meta-codesync[bot]
parent b75a23ca15
commit de8520b7e4
+1 -1
View File
@@ -489,7 +489,7 @@ endif()
if(NOT WIN32)
# Architecture mode to support AVX512 extensions available since Intel(R) Sapphire Rapids.
# Ref: https://networkbuilders.intel.com/solutionslibrary/intel-avx-512-fp16-instruction-set-for-intel-xeon-processor-based-products-technology-guide
target_compile_options(faiss_avx512_spr PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-mavx2 -mfma -mf16c -mavx512f -mavx512cd -mavx512vl -mavx512dq -mavx512bw -mavx512vnni -mavx512vpopcntdq -mpopcnt -mavx512fp16 -mavx512bf16 ${FAISS_BMI2_FLAGS}>)
target_compile_options(faiss_avx512_spr PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-mavx2 -mfma -mf16c -mavx512f -mavx512cd -mavx512vl -mavx512dq -mavx512bw -mavx512vnni -mavx512vpopcntdq -mpopcnt -mavx512fp16 -mavx512bf16 -mprefer-vector-width=512 ${FAISS_BMI2_FLAGS}>)
else()
target_compile_options(faiss_avx512_spr PRIVATE $<$<COMPILE_LANGUAGE:CXX>:/arch:AVX512>)
# we need bigobj for the swig wrapper