Skip to content

Commit 8498964

Browse files
authored
Merge branch 'main' into fix/flat-search-parallelization
2 parents c26d7e0 + ef28c6b commit 8498964

69 files changed

Lines changed: 4466 additions & 1871 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

benchs/avx512_result_handlers/bench_avx512_result_handler.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#if defined(__x86_64__)
9+
810
#include "faiss_avx512_result_handler.h"
911

1012
#include <faiss/IndexIVF.h>
@@ -125,3 +127,5 @@ int main() {
125127

126128
return 0;
127129
}
130+
131+
#endif // defined(__x86_64__)

benchs/avx512_result_handlers/faiss_avx512_result_handler.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#pragma once
99

10+
#if defined(__x86_64__)
11+
1012
#include <faiss/impl/FaissAssert.h>
1113
#include <faiss/impl/ResultHandler.h>
1214
#include <immintrin.h>
@@ -145,3 +147,5 @@ struct ReservoirResultHandlerAVX512 : ResultHandler {
145147
};
146148

147149
} // namespace faiss
150+
151+
#endif // defined(__x86_64__)

benchs/avx512_result_handlers/partition.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#if defined(__x86_64__)
9+
810
#include "partition.h"
911

1012
#include <algorithm>
1113
#include <cassert>
1214
#include <cstdint>
13-
#include <cstdio>
1415
#include <cstring>
1516
#include <limits>
1617
#include <numeric>
@@ -601,3 +602,5 @@ void argsort(size_t n, float* val, int32_t* idx) {
601602
argsort(left_size, val, idx);
602603
argsort(n - left_size, val + left_size, idx + left_size);
603604
}
605+
606+
#endif // defined(__x86_64__)

benchs/avx512_result_handlers/partition.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#pragma once
99

10+
#if defined(__x86_64__)
11+
1012
#include <cstddef>
1113
#include <cstdint>
1214

@@ -38,3 +40,5 @@ void argpartition(size_t n, float* val, int32_t* idx, size_t k);
3840
* @param idx Array of indices (modified in place, reordered with values)
3941
*/
4042
void argsort(size_t n, float* val, int32_t* idx);
43+
44+
#endif // defined(__x86_64__)

benchs/avx512_result_handlers/test_bitonic.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*/
7+
8+
#if defined(__x86_64__)
9+
710
#include <immintrin.h>
811
#include <algorithm>
912
#include <cassert>
@@ -109,3 +112,5 @@ int main() {
109112

110113
return 0;
111114
}
115+
116+
#endif // defined(__x86_64__)

benchs/avx512_result_handlers/test_partition.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#if defined(__x86_64__)
9+
810
#include <gtest/gtest.h>
911

1012
#include "partition.h"
@@ -170,3 +172,5 @@ TEST(ArgpartitionTest, PartitionsCorrectly) {
170172
}
171173
}
172174
}
175+
176+
#endif // defined(__x86_64__)

c_api/utils/distances_c.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ void faiss_fvec_norms_L2sqr(float* norms, const float* x, size_t d, size_t nx);
7474
/// L2-renormalize a set of vector. Nothing done if the vector is 0-normed
7575
void faiss_fvec_renorm_L2(size_t d, size_t nx, float* x);
7676

77-
/// Setter of threshold value on nx above which we switch to BLAS to compute
77+
/// Setter of threshold value on nx * d above which we switch to BLAS to compute
7878
/// distances
7979
void faiss_set_distance_compute_blas_threshold(int value);
8080

81-
/// Getter of threshold value on nx above which we switch to BLAS to compute
81+
/// Getter of threshold value on nx * d above which we switch to BLAS to compute
8282
/// distances
8383
int faiss_get_distance_compute_blas_threshold();
8484

conda/faiss-gpu-cuvs/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ outputs:
6363
- openblas =0.3.32 # [not x86_64]
6464
- libcuvs =26.02
6565
- cuda-version {{ cuda_constraints }}
66-
- libsvs-runtime =0.2.0 # [x86_64 and linux]
66+
- libsvs-runtime =0.3.0 # [x86_64 and linux]
6767
run:
6868
- _openmp_mutex =4.5=2_kmp_llvm # [x86_64]
6969
- mkl >=2024.2.2 # [x86_64]
@@ -73,7 +73,7 @@ outputs:
7373
- libcuvs =26.02
7474
- cuda-version {{ cuda_constraints }}
7575
- libnvjitlink
76-
- libsvs-runtime =0.2.0 # [x86_64 and linux]
76+
- libsvs-runtime =0.3.0 # [x86_64 and linux]
7777
test:
7878
requires:
7979
- conda-build

conda/faiss-gpu/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ outputs:
6060
host:
6161
- mkl >=2024.2.2 # [x86_64]
6262
- openblas =0.3.32 # [not x86_64]
63-
- libsvs-runtime =0.2.0 # [x86_64 and linux]
63+
- libsvs-runtime =0.3.0 # [x86_64 and linux]
6464
run:
6565
- mkl >=2024.2.2 # [x86_64]
6666
- openblas =0.3.32 # [not x86_64]
6767
- cuda-cudart {{ cuda_constraints }}
6868
- libcublas {{ libcublas_constraints }}
69-
- libsvs-runtime =0.2.0 # [x86_64 and linux]
69+
- libsvs-runtime =0.3.0 # [x86_64 and linux]
7070
test:
7171
requires:
7272
- conda-build

conda/faiss/meta.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ outputs:
5656
- mkl-devel >=2024.2.2 # [x86_64 and win]
5757
- python_abi
5858
{% endif %}
59-
- libopenblas=0.3.30=openmp_h60d53f8_1 # [osx]
59+
- libopenblas =0.3.32 # [osx]
6060
host:
6161
- python {{ python }}
6262
- libcxx =20.1.1 # [osx and arm64]
63-
- libsvs-runtime =0.2.0 # [x86_64 and linux]
63+
- libsvs-runtime =0.3.0 # [x86_64 and linux]
6464
{% if PY_VER == '3.10' or PY_VER == '3.11' %}
6565
- mkl >=2024.2.2 # [x86_64]
6666
- python_abi <3.12
@@ -70,11 +70,11 @@ outputs:
7070
- python_abi =3.12
7171
{% endif %}
7272
- openblas =0.3.32 # [not x86_64]
73-
- libopenblas=0.3.30=openmp_h60d53f8_1 # [osx]
73+
- libopenblas =0.3.32 # [osx]
7474
run:
7575
- python {{ python }}
7676
- libcxx =20.1.1 # [osx and arm64]
77-
- libsvs-runtime =0.2.0 # [x86_64 and linux]
77+
- libsvs-runtime =0.3.0 # [x86_64 and linux]
7878
{% if PY_VER == '3.10' or PY_VER == '3.11' %}
7979
- mkl >=2024.2.2 # [x86_64]
8080
- python_abi <3.12
@@ -84,7 +84,7 @@ outputs:
8484
- python_abi =3.12
8585
{% endif %}
8686
- openblas =0.3.32 # [not x86_64]
87-
- libopenblas=0.3.30=openmp_h60d53f8_1 # [osx]
87+
- libopenblas =0.3.32 # [osx]
8888
test:
8989
requires:
9090
- conda-build =25.1.2
@@ -120,7 +120,7 @@ outputs:
120120
- mkl >=2024.2.2 # [x86_64 and win]
121121
- python_abi =3.12
122122
{% endif %}
123-
- libopenblas=0.3.30=openmp_h60d53f8_1 # [osx]
123+
- libopenblas =0.3.32 # [osx]
124124
host:
125125
- python {{ python }}
126126
- numpy >=2.0,<3.0
@@ -136,7 +136,7 @@ outputs:
136136
- mkl >=2024.2.2 # [x86_64 and win]
137137
- python_abi =3.12
138138
{% endif %}
139-
- libopenblas=0.3.30=openmp_h60d53f8_1 # [osx]
139+
- libopenblas =0.3.32 # [osx]
140140
run:
141141
- python {{ python }}
142142
- numpy >=2.0,<3.0
@@ -151,7 +151,7 @@ outputs:
151151
- mkl >=2024.2.2 # [x86_64 and win]
152152
- python_abi =3.12
153153
{% endif %}
154-
- libopenblas=0.3.30=openmp_h60d53f8_1 # [osx]
154+
- libopenblas =0.3.32 # [osx]
155155
test:
156156
requires:
157157
- numpy >=2.0,<3.0

0 commit comments

Comments
 (0)