From d707556ec2a819a6fc241feac9e5b4f104dd9214 Mon Sep 17 00:00:00 2001 From: Gao Date: Tue, 7 Nov 2023 19:12:09 +0800 Subject: [PATCH] Remove unused stats in PQFastScan (#180) (#184) Signed-off-by: chasingegg --- thirdparty/faiss/faiss/IndexIVFPQFastScan.h | 21 --------------------- thirdparty/faiss/faiss/IndexPQFastScan.cpp | 7 ------- thirdparty/faiss/faiss/IndexPQFastScan.h | 12 ------------ 3 files changed, 40 deletions(-) diff --git a/thirdparty/faiss/faiss/IndexIVFPQFastScan.h b/thirdparty/faiss/faiss/IndexIVFPQFastScan.h index 76e4ed723..a57d60b90 100644 --- a/thirdparty/faiss/faiss/IndexIVFPQFastScan.h +++ b/thirdparty/faiss/faiss/IndexIVFPQFastScan.h @@ -230,25 +230,4 @@ struct IndexIVFPQFastScan : IndexIVF { const BitsetView bitset = nullptr) const; }; -struct IVFFastScanStats { - uint64_t times[10]; - uint64_t t_compute_distance_tables, t_round; - uint64_t t_copy_pack, t_scan, t_to_flat; - uint64_t reservoir_times[4]; - - double Mcy_at(int i) { - return times[i] / (1000 * 1000.0); - } - - double Mcy_reservoir_at(int i) { - return reservoir_times[i] / (1000 * 1000.0); - } - IVFFastScanStats() { - reset(); - } - void reset() { - memset(this, 0, sizeof(*this)); - } -}; - } // namespace faiss diff --git a/thirdparty/faiss/faiss/IndexPQFastScan.cpp b/thirdparty/faiss/faiss/IndexPQFastScan.cpp index 2cf20fa5e..3da3c252e 100644 --- a/thirdparty/faiss/faiss/IndexPQFastScan.cpp +++ b/thirdparty/faiss/faiss/IndexPQFastScan.cpp @@ -408,16 +408,9 @@ void IndexPQFastScan::search_implem_12( if (!(skip & 8)) { handler.to_flat_arrays(distances, labels, normalizers.get()); } - - FastScan_stats.t0 += handler.times[0]; - FastScan_stats.t1 += handler.times[1]; - FastScan_stats.t2 += handler.times[2]; - FastScan_stats.t3 += handler.times[3]; } } -FastScanStats FastScan_stats; - template void IndexPQFastScan::search_implem_14( idx_t n, diff --git a/thirdparty/faiss/faiss/IndexPQFastScan.h b/thirdparty/faiss/faiss/IndexPQFastScan.h index cbbb49d65..501772d5c 100644 --- a/thirdparty/faiss/faiss/IndexPQFastScan.h +++ b/thirdparty/faiss/faiss/IndexPQFastScan.h @@ -111,16 +111,4 @@ struct IndexPQFastScan : Index { int impl) const; }; -struct FastScanStats { - uint64_t t0, t1, t2, t3; - FastScanStats() { - reset(); - } - void reset() { - memset(this, 0, sizeof(*this)); - } -}; - -FAISS_API extern FastScanStats FastScan_stats; - } // namespace faiss