Loading CHANGELOG.md +2 −1 Original line number Diff line number Diff line Loading @@ -69,8 +69,9 @@ Please mark all change in change log and use the issue from GitHub - \#1234 Do S3 server validation check when Milvus startup - \#1263 Allow system conf modifiable and some take effect directly - \#1320 Remove debug logging from faiss - \#1426 - Support to configure whether to enabled autoflush and the autoflush interval - \#1426 Support to configure whether to enabled autoflush and the autoflush interval - \#1444 Improve delete - \#1480 Add return code for AVX512 selection ## Task Loading core/src/index/thirdparty/faiss/FaissHook.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ bool support_sse() { return (instruction_set_inst.SSE()); } void hook_init() { std::string hook_init() { static std::mutex hook_mutex; std::lock_guard<std::mutex> lock(hook_mutex); Loading @@ -65,6 +65,7 @@ void hook_init() { sq_sel_quantizer = sq_select_quantizer_avx512; std::cout << "FAISS hook AVX512" << std::endl; return "AVX512"; } else if (support_avx()) { /* for IVFFLAT */ fvec_inner_product = fvec_inner_product_avx; Loading @@ -78,6 +79,7 @@ void hook_init() { sq_sel_quantizer = sq_select_quantizer_avx; std::cout << "FAISS hook AVX" << std::endl; return "AVX"; } else if (support_sse()) { /* for IVFFLAT */ fvec_inner_product = fvec_inner_product_sse; Loading @@ -91,8 +93,10 @@ void hook_init() { sq_sel_quantizer = sq_select_quantizer_sse; std::cout << "FAISS hook SSE" << std::endl; return "SSE"; } else { FAISS_ASSERT_MSG(false, "CPU not supported!"); return "UNSUPPORTED"; } } Loading core/src/index/thirdparty/faiss/FaissHook.h +2 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ #include <vector> #include <stddef.h> #include <string> #include <faiss/impl/ScalarQuantizerOp.h> namespace faiss { Loading @@ -28,6 +29,6 @@ extern sq_sel_func_ptr sq_sel_quantizer; extern bool support_avx512(); extern void hook_init(); extern std::string hook_init(); } // namespace faiss core/src/wrapper/KnowhereResource.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include "faiss/FaissHook.h" #include "scheduler/Utils.h" #include "server/Config.h" #include "utils/Log.h" #include <fiu-local.h> #include <map> Loading @@ -36,7 +37,8 @@ KnowhereResource::Initialize() { bool use_avx512 = true; CONFIG_CHECK(config.GetEngineConfigUseAVX512(use_avx512)); faiss::faiss_use_avx512 = use_avx512; faiss::hook_init(); std::string type = faiss::hook_init(); ENGINE_LOG_DEBUG << "FAISS hook " << type; #ifdef MILVUS_GPU_VERSION bool enable_gpu = false; Loading Loading
CHANGELOG.md +2 −1 Original line number Diff line number Diff line Loading @@ -69,8 +69,9 @@ Please mark all change in change log and use the issue from GitHub - \#1234 Do S3 server validation check when Milvus startup - \#1263 Allow system conf modifiable and some take effect directly - \#1320 Remove debug logging from faiss - \#1426 - Support to configure whether to enabled autoflush and the autoflush interval - \#1426 Support to configure whether to enabled autoflush and the autoflush interval - \#1444 Improve delete - \#1480 Add return code for AVX512 selection ## Task Loading
core/src/index/thirdparty/faiss/FaissHook.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ bool support_sse() { return (instruction_set_inst.SSE()); } void hook_init() { std::string hook_init() { static std::mutex hook_mutex; std::lock_guard<std::mutex> lock(hook_mutex); Loading @@ -65,6 +65,7 @@ void hook_init() { sq_sel_quantizer = sq_select_quantizer_avx512; std::cout << "FAISS hook AVX512" << std::endl; return "AVX512"; } else if (support_avx()) { /* for IVFFLAT */ fvec_inner_product = fvec_inner_product_avx; Loading @@ -78,6 +79,7 @@ void hook_init() { sq_sel_quantizer = sq_select_quantizer_avx; std::cout << "FAISS hook AVX" << std::endl; return "AVX"; } else if (support_sse()) { /* for IVFFLAT */ fvec_inner_product = fvec_inner_product_sse; Loading @@ -91,8 +93,10 @@ void hook_init() { sq_sel_quantizer = sq_select_quantizer_sse; std::cout << "FAISS hook SSE" << std::endl; return "SSE"; } else { FAISS_ASSERT_MSG(false, "CPU not supported!"); return "UNSUPPORTED"; } } Loading
core/src/index/thirdparty/faiss/FaissHook.h +2 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ #include <vector> #include <stddef.h> #include <string> #include <faiss/impl/ScalarQuantizerOp.h> namespace faiss { Loading @@ -28,6 +29,6 @@ extern sq_sel_func_ptr sq_sel_quantizer; extern bool support_avx512(); extern void hook_init(); extern std::string hook_init(); } // namespace faiss
core/src/wrapper/KnowhereResource.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include "faiss/FaissHook.h" #include "scheduler/Utils.h" #include "server/Config.h" #include "utils/Log.h" #include <fiu-local.h> #include <map> Loading @@ -36,7 +37,8 @@ KnowhereResource::Initialize() { bool use_avx512 = true; CONFIG_CHECK(config.GetEngineConfigUseAVX512(use_avx512)); faiss::faiss_use_avx512 = use_avx512; faiss::hook_init(); std::string type = faiss::hook_init(); ENGINE_LOG_DEBUG << "FAISS hook " << type; #ifdef MILVUS_GPU_VERSION bool enable_gpu = false; Loading