Skip to content

Commit 231153c

Browse files
committed
Updated Faiss to 1.14.2
1 parent 0900bb1 commit 231153c

11 files changed

Lines changed: 23 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.1 (unreleased)
2+
3+
- Updated Faiss to 1.14.2
4+
15
## 0.6.0 (2026-04-06)
26

37
- Updated Faiss to 1.14.1

Rakefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,13 @@ task :remove_ext do
2525
end
2626
end
2727

28-
Rake::Task["build"].enhance [:remove_ext]
28+
task :remove_obj do
29+
Dir["ext/faiss/*.o"].each do |path|
30+
File.unlink(path)
31+
end
32+
end
33+
34+
Rake::Task["build"].enhance [:remove_ext, :remove_obj]
35+
Rake::Task["compile"].enhance [:remove_obj]
36+
37+
CLEAN.include("vendor/faiss/**/*.o")

ext/faiss/extconf.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434

3535
$srcs = Dir["{#{ext},#{vendor}/faiss,#{vendor}/faiss/{impl,invlists,utils}/**}/*.{cpp}"]
3636
$srcs -= ["avx2", "avx512", "aarch64", "arm_sve"].map { |v| "#{vendor}/faiss/utils/simd_impl/distances_#{v}.cpp" }
37+
$objs = $srcs.map { |v| v.sub(/cpp\z/, "o") }
3738
abort "Faiss not found" unless find_header("faiss/Index.h", vendor)
38-
$VPATH += $srcs.filter_map { |v| File.dirname(v) if v.start_with?(vendor) }.uniq
39+
$VPATH << vendor
3940

4041
create_makefile("faiss/ext")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <rice/rice.hpp>
2323

2424
#include "numo.hpp"
25-
#include "utils_rb.h"
25+
#include "utils.h"
2626

2727
namespace Rice::detail {
2828
template<>

ext/faiss/index_binary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <rice/rice.hpp>
1414

1515
#include "numo.hpp"
16-
#include "utils_rb.h"
16+
#include "utils.h"
1717

1818
void init_index_binary(Rice::Module& m) {
1919
Rice::define_class_under<faiss::IndexBinary>(m, "IndexBinary")

ext/faiss/kmeans.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <rice/rice.hpp>
77

88
#include "numo.hpp"
9-
#include "utils_rb.h"
9+
#include "utils.h"
1010

1111
void init_kmeans(Rice::Module& m) {
1212
Rice::define_class_under<faiss::Clustering>(m, "Kmeans")

ext/faiss/pca_matrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <rice/rice.hpp>
55

66
#include "numo.hpp"
7-
#include "utils_rb.h"
7+
#include "utils.h"
88

99
void init_pca_matrix(Rice::Module& m) {
1010
Rice::define_class_under<faiss::PCAMatrix>(m, "PCAMatrix")

ext/faiss/product_quantizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <rice/rice.hpp>
66

77
#include "numo.hpp"
8-
#include "utils_rb.h"
8+
#include "utils.h"
99

1010
void init_product_quantizer(Rice::Module& m) {
1111
Rice::define_class_under<faiss::ProductQuantizer>(m, "ProductQuantizer")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <rice/rice.hpp>
44

55
#include "numo.hpp"
6-
#include "utils_rb.h"
6+
#include "utils.h"
77

88
size_t check_shape(const numo::NArray& objects, size_t k) {
99
size_t ndim = objects.ndim();
File renamed without changes.

0 commit comments

Comments
 (0)