Skip to content

Commit 815d86d

Browse files
authored
Patch FAISS for missing Thrust includes (#1398)
This PR patches FAISS for some missing Thrust includes. This is needed to support building with CCCL 3.1.x. RAPIDS 25.10 will still use CCCL 3.0.x but we want to make it possible to build with 3.1.x in 25.10. xref: #1329 (This backports a fix from that testing PR, which is targeting 25.12) I am upstreaming the patch here: facebookresearch/faiss#4597 Authors: - Bradley Dice (https://github.com/bdice) - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Tarang Jain (https://github.com/tarang-jain) - Divye Gala (https://github.com/divyegala) URL: #1398
1 parent 668e1b5 commit 815d86d

2 files changed

Lines changed: 53 additions & 6 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 87c5331dfa6ec30fd9839ecb89af519e65f010e7 Mon Sep 17 00:00:00 2001
2+
From: Bradley Dice <bdice@bradleydice.com>
3+
Date: Mon, 29 Sep 2025 15:39:17 -0500
4+
Subject: [PATCH] Fix missing includes for thrust::copy
5+
6+
---
7+
faiss/gpu/impl/BinaryCuvsCagra.cu | 3 +++
8+
faiss/gpu/impl/CuvsCagra.cu | 3 +++
9+
2 files changed, 6 insertions(+)
10+
11+
diff --git a/faiss/gpu/impl/BinaryCuvsCagra.cu b/faiss/gpu/impl/BinaryCuvsCagra.cu
12+
index 0ca21dc5f..b331fdc8f 100644
13+
--- a/faiss/gpu/impl/BinaryCuvsCagra.cu
14+
+++ b/faiss/gpu/impl/BinaryCuvsCagra.cu
15+
@@ -32,6 +32,9 @@
16+
#include <raft/core/resource/thrust_policy.hpp>
17+
#include <raft/linalg/map.cuh>
18+
19+
+#include <thrust/copy.h>
20+
+#include <thrust/device_ptr.h>
21+
+
22+
namespace faiss {
23+
namespace gpu {
24+
25+
diff --git a/faiss/gpu/impl/CuvsCagra.cu b/faiss/gpu/impl/CuvsCagra.cu
26+
index 9ac4e1c5a..755817f43 100644
27+
--- a/faiss/gpu/impl/CuvsCagra.cu
28+
+++ b/faiss/gpu/impl/CuvsCagra.cu
29+
@@ -31,6 +31,9 @@
30+
#include <raft/core/device_resources.hpp>
31+
#include <raft/core/resource/thrust_policy.hpp>
32+
33+
+#include <thrust/copy.h>
34+
+#include <thrust/device_ptr.h>
35+
+
36+
namespace faiss {
37+
namespace gpu {
38+
39+
--
40+
2.49.0
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{
2-
"packages" : {
3-
"faiss" : {
4-
"version": "1.12.0",
5-
"git_url": "https://github.com/facebookresearch/faiss.git",
6-
"git_tag": "v1.12.0"
7-
}
2+
"packages" : {
3+
"faiss" : {
4+
"version": "1.12.0",
5+
"git_url": "https://github.com/facebookresearch/faiss.git",
6+
"git_tag": "v1.12.0",
7+
"patches" : [
8+
{
9+
"file" : "${current_json_dir}/faiss/fix-missing-includes-for-thrust-copy.patch",
10+
"issue" : "Fix missing Thrust includes. https://github.com/facebookresearch/faiss/pull/4597",
11+
"fixed_in" : ""
12+
}
13+
]
814
}
915
}
16+
}

0 commit comments

Comments
 (0)