Skip to content

Commit ddbaca9

Browse files
authored
Merge branch 'main' into all-neigh-cpu-output-api
2 parents a6eacef + 86b9038 commit ddbaca9

2 files changed

Lines changed: 36 additions & 16 deletions

File tree

cpp/cmake/patches/diskann.diff

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 3d3d2b8..a007fa4 100644
2+
index 3d3d2b86..c5642e64 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -23,10 +23,6 @@ set(CMAKE_STANDARD 17)
6-
set(CMAKE_CXX_STANDARD 17)
5+
@@ -19,14 +19,10 @@
6+
cmake_minimum_required(VERSION 3.15)
7+
project(diskann)
8+
9+
-set(CMAKE_STANDARD 17)
10+
-set(CMAKE_CXX_STANDARD 17)
11+
+set(CMAKE_STANDARD 20)
12+
+set(CMAKE_CXX_STANDARD 20)
713
set(CMAKE_CXX_STANDARD_REQUIRED ON)
814

915
-if(NOT MSVC)
@@ -100,7 +106,7 @@ index 3d3d2b8..a007fa4 100644
100106
if (UNIT_TEST)
101107
enable_testing()
102108
diff --git a/include/ann_exception.h b/include/ann_exception.h
103-
index 6b81373..a385198 100644
109+
index 6b81373c..a3851988 100644
104110
--- a/include/ann_exception.h
105111
+++ b/include/ann_exception.h
106112
@@ -2,6 +2,7 @@
@@ -112,7 +118,7 @@ index 6b81373..a385198 100644
112118
#include <stdexcept>
113119
#include <system_error>
114120
diff --git a/include/distance.h b/include/distance.h
115-
index f3b1de2..d4da72e 100644
121+
index f3b1de25..d4da72e5 100644
116122
--- a/include/distance.h
117123
+++ b/include/distance.h
118124
@@ -77,6 +77,7 @@ class DistanceCosineInt8 : public Distance<int8_t>
@@ -197,7 +203,7 @@ index f3b1de2..d4da72e 100644
197203
{
198204
// Inner product returns negative values to indicate distance.
199205
diff --git a/include/utils.h b/include/utils.h
200-
index d3af5c3..417af31 100644
206+
index d3af5c3a..417af314 100644
201207
--- a/include/utils.h
202208
+++ b/include/utils.h
203209
@@ -29,6 +29,7 @@ typedef int FileHandle;
@@ -209,7 +215,7 @@ index d3af5c3..417af31 100644
209215
#ifdef EXEC_ENV_OLS
210216
#include "content_buf.h"
211217
diff --git a/src/index.cpp b/src/index.cpp
212-
index bf93344..9d8336c 100644
218+
index 486d41e7..1e3feae8 100644
213219
--- a/src/index.cpp
214220
+++ b/src/index.cpp
215221
@@ -17,9 +17,7 @@
@@ -223,7 +229,7 @@ index bf93344..9d8336c 100644
223229
#include "index.h"
224230

225231
diff --git a/src/partition.cpp b/src/partition.cpp
226-
index 570d45c..fb54cbf 100644
232+
index 570d45c7..fb54cbfd 100644
227233
--- a/src/partition.cpp
228234
+++ b/src/partition.cpp
229235
@@ -21,9 +21,7 @@
@@ -237,7 +243,7 @@ index 570d45c..fb54cbf 100644
237243
// block size for reading/ processing large files and matrices in blocks
238244
#define BLOCK_SIZE 5000000
239245
diff --git a/src/pq_flash_index.cpp b/src/pq_flash_index.cpp
240-
index d9ad506..145a978 100644
246+
index 860ce58f..fc0fb0ec 100644
241247
--- a/src/pq_flash_index.cpp
242248
+++ b/src/pq_flash_index.cpp
243249
@@ -8,6 +8,7 @@

cpp/cmake/patches/faiss-1.14-cuvs-26.02.diff

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 8e398785..0789e59d 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -53,11 +53,7 @@ project(faiss
6+
LANGUAGES ${FAISS_LANGUAGES})
7+
include(GNUInstallDirs)
8+
9+
-if(FAISS_ENABLE_CUVS)
10+
- set(CMAKE_CXX_STANDARD 17)
11+
-else()
12+
- set(CMAKE_CXX_STANDARD 20)
13+
-endif()
14+
+set(CMAKE_CXX_STANDARD 20)
15+
16+
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
17+
118
diff --git a/faiss/gpu/impl/CuvsIVFPQ.cu b/faiss/gpu/impl/CuvsIVFPQ.cu
2-
index 1e2fef225..2ee40da46 100644
19+
index 1e2fef22..f2f29302 100644
320
--- a/faiss/gpu/impl/CuvsIVFPQ.cu
421
+++ b/faiss/gpu/impl/CuvsIVFPQ.cu
522
@@ -129,8 +129,14 @@ void CuvsIVFPQ::updateQuantizer(Index* quantizer) {
@@ -138,19 +155,16 @@ index 1e2fef225..2ee40da46 100644
138155

139156
for (size_t i = 0; i < nlist; ++i) {
140157
size_t listSize = ivf->list_size(i);
141-
@@ -426,9 +490,9 @@ void CuvsIVFPQ::copyInvertedListsFrom(const InvertedLists* ivf) {
158+
@@ -426,7 +490,7 @@ void CuvsIVFPQ::copyInvertedListsFrom(const InvertedLists* ivf) {
142159
// This cuVS list must currently be empty
143160
FAISS_ASSERT(getListLength(i) == 0);
144161

145162
- cuvs::neighbors::ivf::resize_list(
146163
+ cuvs::neighbors::ivf_pq::helpers::resize_list(
147164
raft_handle,
148-
- cuvs_index_lists[i],
149-
+ cuvs_index_lists[i],
165+
cuvs_index_lists[i],
150166
ivf_list_spec,
151-
static_cast<uint32_t>(listSize),
152-
static_cast<uint32_t>(0));
153-
@@ -520,7 +587,7 @@ void CuvsIVFPQ::setPQCentroids_() {
167+
@@ -520,7 +584,7 @@ void CuvsIVFPQ::setPQCentroids_() {
154168
auto stream = resources_->getDefaultStreamCurrentDevice();
155169

156170
raft::copy(

0 commit comments

Comments
 (0)