Skip to content

Commit 7d83232

Browse files
committed
bug fix
1 parent 8b35dfa commit 7d83232

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

faiss/IndexIVF.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ void Level1Quantizer::train_q1(
9191
} else {
9292
clus.train(n, x, *quantizer);
9393
}
94+
#ifdef __aarch64__
95+
quantizer->train(-1, x);
96+
#endif
9497
quantizer->is_trained = true;
9598
} else if (quantizer_trains_alone == 2) {
9699
if (verbose) {
@@ -471,7 +474,9 @@ void IndexIVF::search_preassigned(
471474
get_InvertedListScanner(store_pairs, sel, params));
472475

473476
#ifdef __aarch64__
474-
krl_create_LUT8b_handle(&(scanner->klh),(int)(sel != nullptr), tmp_buffer_size);
477+
if (tmp_buffer_size > 0) {
478+
krl_create_LUT8b_handle(&(scanner->klh),(int)(sel != nullptr), tmp_buffer_size);
479+
}
475480
#endif
476481
/*****************************************************
477482
* Depending on parallel_mode, there are two possible ways

0 commit comments

Comments
 (0)