enhance: Introduce the support of Intel SVS (#48799)

related PRs:
* https://github.com/zilliztech/VectorDBBench/pull/749 for vectordbbench
* https://github.com/zilliztech/knowhere/pull/1537 for knowhere
* https://github.com/milvus-io/milvus/pull/48798 for Milvus 3.0

Signed-off-by: Alexandr Guzhva <alexanderguzhva@gmail.com>
This commit is contained in:
Alexander Guzhva
2026-04-08 06:39:41 +08:00
committed by GitHub
parent a14c729247
commit 98245e12a4
3 changed files with 38 additions and 5 deletions
+9 -4
View File
@@ -58,6 +58,11 @@ ifdef USE_OPENDAL
use_opendal = ${USE_OPENDAL}
endif
use_svs = OFF
ifdef USE_SVS
use_svs = ${USE_SVS}
endif
# FIPS: default OFF. Set MILVUS_FIPS_ENABLED=ON to enable BoringCrypto.
GOEXPERIMENT_FLAG :=
ifeq ($(MILVUS_FIPS_ENABLED),ON)
@@ -293,19 +298,19 @@ generated-proto: download-milvus-proto build-3rdparty get-proto-deps
build-cpp: generated-proto plan-parser-lib
@echo "Building Milvus cpp library ..."
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -a ${use_asan} -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -o ${use_opendal} -f $(tantivy_features))
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -a ${use_asan} -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -o ${use_opendal} -f $(tantivy_features) -S ${use_svs})
build-cpp-gpu: generated-proto plan-parser-lib
@echo "Building Milvus cpp gpu library ... "
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -g -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -o ${use_opendal} -f $(tantivy_features))
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -g -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -o ${use_opendal} -f $(tantivy_features) -S ${use_svs})
build-cpp-with-unittest: generated-proto plan-parser-lib
@echo "Building Milvus cpp library with unittest ... "
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -a ${use_asan} -u -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -o ${use_opendal} -f $(tantivy_features))
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -a ${use_asan} -u -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -o ${use_opendal} -f $(tantivy_features) -S ${use_svs})
build-cpp-with-coverage: generated-proto plan-parser-lib
@echo "Building Milvus cpp library with coverage and unittest ..."
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -a ${use_asan} -u -c -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -o ${use_opendal} -f $(tantivy_features))
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -a ${use_asan} -u -c -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -o ${use_opendal} -f $(tantivy_features) -S ${use_svs})
check-proto-product: generated-proto
@(env bash $(PWD)/scripts/check_proto_product.sh)
+22
View File
@@ -39,6 +39,12 @@ if ( MILVUS_GPU_VERSION STREQUAL "ON" )
set(WITH_CUVS ON CACHE BOOL "" FORCE )
endif ()
if ( WITH_SVS STREQUAL "ON" )
set(WITH_SVS ON CACHE BOOL "" FORCE )
else ()
set(WITH_SVS OFF CACHE BOOL "" FORCE )
endif()
set( CMAKE_PREFIX_PATH ${CONAN_BOOST_ROOT} )
FetchContent_Declare(
knowhere
@@ -58,6 +64,22 @@ if ( NOT knowhere_POPULATED )
${knowhere_BINARY_DIR} )
endif()
# Install the SVS runtime shared library alongside libknowhere.so so that
# the Go linker (and the final binary at runtime) can find it.
# svs_SOURCE_DIR is set inside knowhere's subdirectory scope and does not
# propagate here, so we derive the path from FETCHCONTENT_BASE_DIR which
# is in the CMake cache (set by internal/core/CMakeLists.txt).
if ( WITH_SVS STREQUAL "ON" )
set( _SVS_LIB_DIR "${FETCHCONTENT_BASE_DIR}/svs-src/lib" )
if ( EXISTS "${_SVS_LIB_DIR}" )
install(DIRECTORY ${_SVS_LIB_DIR}/
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
FILES_MATCHING PATTERN "libsvs_runtime.so*")
else()
message(WARNING "SVS enabled but ${_SVS_LIB_DIR} not found \u2014 libsvs_runtime.so will not be installed")
endif()
endif()
# get prometheus COMPILE_OPTIONS
get_property( var DIRECTORY "${knowhere_SOURCE_DIR}" PROPERTY COMPILE_OPTIONS )
message( STATUS "knowhere src compile options: ${var}" )
+7 -1
View File
@@ -100,6 +100,7 @@ BUILD_DISK_ANN="OFF"
USE_ASAN="OFF"
USE_DYNAMIC_SIMD="ON"
USE_OPENDAL="OFF"
USE_SVS="OFF"
TANTIVY_FEATURES=""
INDEX_ENGINE="KNOWHERE"
ENABLE_AZURE_FS="ON"
@@ -111,7 +112,7 @@ fi
: "${USE_PCH:="ON"}"
: "${USE_UNITY_BUILD:="OFF"}"
while getopts "p:t:s:n:a:y:x:o:f:ulcgbZh" arg; do
while getopts "p:t:s:n:a:y:x:o:f:S:ulcgbZh" arg; do
case $arg in
p)
INSTALL_PREFIX=$OPTARG
@@ -157,6 +158,9 @@ while getopts "p:t:s:n:a:y:x:o:f:ulcgbZh" arg; do
o)
USE_OPENDAL=$OPTARG
;;
S)
USE_SVS=$OPTARG
;;
f)
TANTIVY_FEATURES=$OPTARG
;;
@@ -177,6 +181,7 @@ parameter:
-a: build milvus with AddressSanitizer(default: false)
-Z: build milvus without azure-sdk-for-cpp, so cannot use azure blob
-o: build milvus with opendal(default: false)
-S: build milvus with SVS/Intel Scalable Vector Search(default: OFF)
-f: build milvus with tantivy features(default: '')
-h: help
@@ -249,6 +254,7 @@ ${CMAKE_EXTRA_ARGS} \
-DUSE_DYNAMIC_SIMD=${USE_DYNAMIC_SIMD} \
-DCPU_ARCH=${CPU_ARCH} \
-DUSE_OPENDAL=${USE_OPENDAL} \
-DWITH_SVS=${USE_SVS} \
-DINDEX_ENGINE=${INDEX_ENGINE} \
-DTANTIVY_FEATURES_LIST=${TANTIVY_FEATURES} \
-DENABLE_GCP_NATIVE=${ENABLE_GCP_NATIVE} \