Skip to content

Commit e5bd745

Browse files
committed
Update Python API to use blocked implementations from PR #86
1 parent 1f1a428 commit e5bd745

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

apis/python/src/tiledb/vector_search/module.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static void declare_qv_query_heap_finite_ram(py::module& m, const std::string& s
162162

163163
template <typename T, typename Id_Type = uint64_t>
164164
static void declare_nuv_query_heap_infinite_ram(py::module& m, const std::string& suffix) {
165-
m.def(("nuv_query_heap_infinite_ram_" + suffix).c_str(),
165+
m.def(("nuv_query_heap_infinite_ram_reg_blocked_" + suffix).c_str(),
166166
[](const ColMajorMatrix<T>& parts,
167167
const ColMajorMatrix<float>& centroids,
168168
const ColMajorMatrix<float>& query_vectors,
@@ -173,7 +173,7 @@ static void declare_nuv_query_heap_infinite_ram(py::module& m, const std::string
173173
bool nth,
174174
size_t nthreads) -> ColMajorMatrix<size_t> { // TODO change return type
175175

176-
auto r = detail::ivf::nuv_query_heap_infinite_ram(
176+
auto r = detail::ivf::nuv_query_heap_infinite_ram_reg_blocked(
177177
parts,
178178
centroids,
179179
query_vectors,
@@ -189,7 +189,7 @@ static void declare_nuv_query_heap_infinite_ram(py::module& m, const std::string
189189

190190
template <typename T, typename Id_Type = uint64_t>
191191
static void declare_nuv_query_heap_finite_ram(py::module& m, const std::string& suffix) {
192-
m.def(("nuv_query_heap_finite_ram_" + suffix).c_str(),
192+
m.def(("nuv_query_heap_finite_ram_reg_blocked_" + suffix).c_str(),
193193
[](tiledb::Context& ctx,
194194
const std::string& parts_uri,
195195
const ColMajorMatrix<float>& centroids,
@@ -202,7 +202,7 @@ static void declare_nuv_query_heap_finite_ram(py::module& m, const std::string&
202202
bool nth,
203203
size_t nthreads) -> ColMajorMatrix<size_t> { // TODO change return type
204204

205-
auto r = detail::ivf::nuv_query_heap_finite_ram<T, Id_Type>(
205+
auto r = detail::ivf::nuv_query_heap_finite_ram_reg_blocked<T, Id_Type>(
206206
ctx,
207207
parts_uri,
208208
centroids,
@@ -465,7 +465,7 @@ PYBIND11_MODULE(_tiledbvspy, m) {
465465
});
466466

467467
m.def("validate_top_k_u64",
468-
[](const ColMajorMatrix<uint64_t>& top_k,
468+
[](const ColMajorMatrix<size_t>& top_k,
469469
const ColMajorMatrix<int32_t>& ground_truth) -> bool {
470470
return validate_top_k(top_k, ground_truth);
471471
});

apis/python/src/tiledb/vector_search/module.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ def ivf_query_ram(
204204

205205
if dtype == np.float32:
206206
if use_nuv_implementation:
207-
return nuv_query_heap_infinite_ram_f32(*args)
207+
return nuv_query_heap_infinite_ram_reg_blocked_f32(*args)
208208
else:
209209
return qv_query_heap_infinite_ram_f32(*args)
210210
elif dtype == np.uint8:
211211
if use_nuv_implementation:
212-
return nuv_query_heap_infinite_ram_u8(*args)
212+
return nuv_query_heap_infinite_ram_reg_blocked_u8(*args)
213213
else:
214214
return qv_query_heap_infinite_ram_u8(*args)
215215
else:
@@ -282,12 +282,12 @@ def ivf_query(
282282

283283
if dtype == np.float32:
284284
if use_nuv_implementation:
285-
return nuv_query_heap_finite_ram_f32(*args)
285+
return nuv_query_heap_finite_ram_reg_blocked_f32(*args)
286286
else:
287287
return qv_query_heap_finite_ram_f32(*args)
288288
elif dtype == np.uint8:
289289
if use_nuv_implementation:
290-
return nuv_query_heap_finite_ram_u8(*args)
290+
return nuv_query_heap_finite_ram_reg_blocked_u8(*args)
291291
else:
292292
return qv_query_heap_finite_ram_u8(*args)
293293
else:

0 commit comments

Comments
 (0)