Skip to content

Commit b975bae

Browse files
authored
[skip e2e]: update cardinal version (#1206)
* update cardinal version Signed-off-by: xianliang.li <xianliang.li@zilliz.com> * Revert "enhance: knowhere support metric mhjaccard and index minhash lsh for minhash vector (#1203)" This reverts commit fd0871f. Signed-off-by: xianliang.li <xianliang.li@zilliz.com> --------- Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
1 parent fd0871f commit b975bae

34 files changed

Lines changed: 21 additions & 2278 deletions

cmake/libs/libcardinal.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use short SHA1 as version
2-
set(CARDINAL_VERSION v2.5.8)
2+
set(CARDINAL_VERSION v2.5.9)
33
set(CARDINAL_REPO_URL "https://github.com/zilliztech/cardinal.git")
44

55
set(CARDINAL_REPO_DIR "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cardinal")

cmake/libs/libfaiss.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ if(__X86_64)
5050
${UTILS_SRC} $<TARGET_OBJECTS:utils_sse> $<TARGET_OBJECTS:utils_avx>
5151
$<TARGET_OBJECTS:utils_avx512> $<TARGET_OBJECTS:utils_avx512icx>)
5252
target_link_libraries(knowhere_utils PUBLIC glog::glog)
53-
target_link_libraries(knowhere_utils PUBLIC xxHash::xxhash)
5453
endif()
5554

5655
if(__AARCH64)
@@ -100,22 +99,19 @@ if(__AARCH64)
10099
endif()
101100

102101
target_link_libraries(knowhere_utils PUBLIC glog::glog)
103-
target_link_libraries(knowhere_utils PUBLIC xxHash::xxhash)
104102
endif()
105103

106104
if(__RISCV64)
107105
set(UTILS_SRC src/simd/hook.cc src/simd/distances_ref.cc)
108106
add_library(knowhere_utils STATIC ${UTILS_SRC})
109107
target_link_libraries(knowhere_utils PUBLIC glog::glog)
110-
target_link_libraries(knowhere_utils PUBLIC xxHash::xxhash)
111108
endif()
112109

113110
# ToDo: Add distances_vsx.cc for powerpc64 SIMD acceleration
114111
if(__PPC64)
115112
set(UTILS_SRC src/simd/hook.cc src/simd/distances_ref.cc src/simd/distances_powerpc.cc)
116113
add_library(knowhere_utils STATIC ${UTILS_SRC})
117114
target_link_libraries(knowhere_utils PUBLIC glog::glog)
118-
target_link_libraries(knowhere_utils PUBLIC xxHash::xxhash)
119115
endif()
120116

121117

@@ -135,9 +131,6 @@ else()
135131
find_package(BLAS REQUIRED)
136132
endif()
137133

138-
find_package(xxHash REQUIRED)
139-
include_directories(${xxHash_INCLUDE_DIRS})
140-
141134
if(__X86_64)
142135
list(REMOVE_ITEM FAISS_SRCS ${FAISS_AVX2_SRCS})
143136

conanfile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ def requirements(self):
106106
self.requires("folly/2023.10.30.09@milvus/dev")
107107
self.requires("libcurl/8.2.1")
108108
self.requires("simde/0.8.2")
109-
self.requires("xxhash/0.8.2")
110109
if self.settings.os == "Android":
111110
self.requires("openblas/0.3.27")
112111
if not self.options.with_light:

include/knowhere/comp/bloomfilter.h

Lines changed: 0 additions & 121 deletions
This file was deleted.

include/knowhere/comp/index_param.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ constexpr const char* INDEX_HNSW_PQ = "HNSW_PQ";
5656
constexpr const char* INDEX_HNSW_PRQ = "HNSW_PRQ";
5757

5858
constexpr const char* INDEX_DISKANN = "DISKANN";
59-
constexpr const char* INDEX_MINHASH_INDEX = "MINHASH_LSH";
6059

6160
constexpr const char* INDEX_SPARSE_INVERTED_INDEX = "SPARSE_INVERTED_INDEX";
6261
constexpr const char* INDEX_SPARSE_WAND = "SPARSE_WAND";
@@ -188,16 +187,6 @@ constexpr const char* DROP_RATIO_SEARCH = "drop_ratio_search";
188187
// RaBitQ Params
189188
constexpr const char* RABITQ_QUERY_BITS = "rbq_bits_query";
190189

191-
// minhash Params
192-
constexpr const char* ALIGNED_BLOCK_SIZE = "aligned_block_size";
193-
constexpr const char* BAND = "band";
194-
constexpr const char* SHARED_BLOOM_FILTER = "shared_bloom_filter";
195-
constexpr const char* BLOOM_FALSE_POSITIVE_RPOB = "bloom_false_positive_prob";
196-
constexpr const char* HASH_CODE_IN_MEM = "hash_code_in_mem";
197-
constexpr const char* SEARCH_WITH_JACCARD = "search_with_jaccard";
198-
constexpr const char* MH_ELEMENT_BIT_WIDTH = "mh_element_bit_width";
199-
constexpr const char* MH_LSH_REFINE_K = "refine_k";
200-
constexpr const char* BATCH_SEARCH = "batch_search";
201190
} // namespace indexparam
202191

203192
using MetricType = std::string;
@@ -208,7 +197,6 @@ constexpr const char* L2 = "L2";
208197
constexpr const char* COSINE = "COSINE";
209198
constexpr const char* HAMMING = "HAMMING";
210199
constexpr const char* JACCARD = "JACCARD";
211-
constexpr const char* MHJACCARD = "MHJACCARD";
212200
constexpr const char* SUBSTRUCTURE = "SUBSTRUCTURE";
213201
constexpr const char* SUPERSTRUCTURE = "SUPERSTRUCTURE";
214202
constexpr const char* BM25 = "BM25";

include/knowhere/config.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,6 @@ class BaseConfig : public Config {
633633
*/
634634
CFG_INT refine_type;
635635
CFG_BOOL refine_with_quant;
636-
/*
637-
* band is a special parameters of BF search and MinHash index node train.
638-
*/
639-
CFG_INT band;
640-
CFG_BOOL search_with_jaccard;
641-
CFG_INT mh_element_bit_width;
642636
KNOHWERE_DECLARE_CONFIG(BaseConfig) {
643637
KNOWHERE_CONFIG_DECLARE_FIELD(dim).allow_empty_without_default().description("vector dim").for_train();
644638
KNOWHERE_CONFIG_DECLARE_FIELD(metric_type)
@@ -787,17 +781,6 @@ class BaseConfig : public Config {
787781
.for_search()
788782
.for_range_search()
789783
.for_iterator();
790-
KNOWHERE_CONFIG_DECLARE_FIELD(band).description("param of MinHashLSH").set_default(1).for_train().for_search();
791-
KNOWHERE_CONFIG_DECLARE_FIELD(mh_element_bit_width)
792-
.description("sizeof(hash code), the hash element should be aligned on 8 bits")
793-
.set_default(8)
794-
.set_range(8, 256)
795-
.for_train()
796-
.for_search();
797-
KNOWHERE_CONFIG_DECLARE_FIELD(search_with_jaccard)
798-
.description("return the jaccard distance of minhash vector search or minhashlsh hit flag.")
799-
.set_default(false)
800-
.for_search();
801784
}
802785
};
803786
} // namespace knowhere

include/knowhere/index/index_factory.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ class IndexFactory {
143143
#define KNOWHERE_MOCK_REGISTER_DENSE_INT_GLOBAL(name, index_node, features, ...) \
144144
KNOWHERE_MOCK_REGISTER_GLOBAL(name, index_node, int8, (features | knowhere::feature::INT8), ##__VA_ARGS__);
145145

146-
// register vector index supporting binary data types
147-
#define KNOWHERE_MOCK_REGISTER_DENSE_BINARY_ALL_GLOBAL(name, index_node, features, ...) \
148-
KNOWHERE_SIMPLE_REGISTER_GLOBAL(name, index_node, bin1, (features | knowhere::feature::BINARY), ##__VA_ARGS__);
149-
150146
// register vector index supporting ALL_DENSE_FLOAT_TYPE(float32, bf16, fp16) data types, but mocked bf16 and fp16
151147
#define KNOWHERE_MOCK_REGISTER_DENSE_FLOAT_ALL_GLOBAL(name, index_node, features, ...) \
152148
KNOWHERE_MOCK_REGISTER_GLOBAL(name, index_node, bf16, (features | knowhere::feature::BF16), ##__VA_ARGS__); \

include/knowhere/index/index_table.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ static std::set<std::pair<std::string, VecType>> legal_knowhere_index = {
9898
// sparse index
9999
{IndexEnum::INDEX_SPARSE_INVERTED_INDEX, VecType::VECTOR_SPARSE_FLOAT},
100100
{IndexEnum::INDEX_SPARSE_WAND, VecType::VECTOR_SPARSE_FLOAT},
101-
// minhash index
102-
{IndexEnum::INDEX_MINHASH_INDEX, VecType::VECTOR_BINARY},
103101
};
104102

105103
static std::set<std::string> legal_support_mmap_knowhere_index = {

include/knowhere/utils.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <strings.h>
1515

1616
#include <algorithm>
17-
#include <fstream>
1817
#include <vector>
1918

2019
#include "knowhere/binaryset.h"
@@ -227,25 +226,6 @@ readBinaryPOD(R& in, T& podRef) {
227226
in.read((char*)&podRef, sizeof(T));
228227
}
229228

230-
inline void
231-
load_binary_vec(const std::string& bin_file, std::unique_ptr<char[]>& data, size_t& npts, size_t& dim) {
232-
std::ifstream file(bin_file, std::ios::binary);
233-
if (!file.is_open()) {
234-
throw std::runtime_error("fail to open file: " + bin_file);
235-
}
236-
uint32_t n, d;
237-
file.read(reinterpret_cast<char*>(&n), sizeof(uint32_t));
238-
file.read(reinterpret_cast<char*>(&d), sizeof(uint32_t));
239-
npts = n;
240-
dim = d;
241-
if (dim % 8 != 0) {
242-
throw std::runtime_error("fail to load binary vector base file, dim % 8 != 0 ");
243-
}
244-
uint64_t total_size = dim * npts / 8;
245-
data = std::make_unique<char[]>(total_size);
246-
file.read(reinterpret_cast<char*>(data.get()), total_size);
247-
}
248-
249229
// taken from
250230
// https://github.com/Microsoft/BLAS-on-flash/blob/master/include/utils.h
251231
// round up X to the nearest multiple of Y

0 commit comments

Comments
 (0)