feat: merge vector arrow buffer (#320)

This commit is contained in:
ZeFeng Yin
2026-04-29 19:24:50 +08:00
committed by GitHub
parent 07e986d3d5
commit 005680522b
24 changed files with 1236 additions and 540 deletions
+10 -1
View File
@@ -1,10 +1,19 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)
# --exclude-libs is GNU ld / LLVM lld only; Apple ld does not support it.
# On macOS (Mach-O), symbol interposition works differently and the
# Arrow/Parquet double-free issue does not apply.
if(NOT APPLE)
set(CORE_KNN_CLUSTER_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()
cc_library(
NAME core_knn_cluster STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS zvec_ailego core_framework
LIBS zvec_ailego core_framework
INCS . ${PROJECT_ROOT_DIR}/src/core ${PROJECT_ROOT_DIR}/src/core/cluster
LDFLAGS "${CORE_KNN_CLUSTER_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
+2 -2
View File
@@ -516,8 +516,8 @@ class HnswEntity {
constexpr static uint32_t kDefaultDocsHardLimit = 1 << 30U; // 1 billion
constexpr static float kDefaultDocsSoftLimitRatio = 0.9f;
constexpr static size_t kMaxChunkSize = 0xFFFFFFFF;
constexpr static size_t kDefaultChunkSize = 2 * 1024UL * 1024UL;
constexpr static size_t kDefaultMaxChunkCnt = 50000UL;
constexpr static size_t kDefaultChunkSize = 16 * 1024UL;
constexpr static size_t kDefaultMaxChunkCnt = 128 * 50000UL;
constexpr static float kDefaultNeighborPruneMultiplier =
1.0f; // prune_cnt = upper_max_neighbor_cnt * multiplier
constexpr static float kDefaultL0MaxNeighborCntMultiplier =