Skip to content

Commit

Permalink
Remove unused stats in PQFastScan (#180) (#184)
Browse files Browse the repository at this point in the history
Signed-off-by: chasingegg <[email protected]>
  • Loading branch information
chasingegg authored Nov 7, 2023
1 parent f4c1757 commit d707556
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
21 changes: 0 additions & 21 deletions thirdparty/faiss/faiss/IndexIVFPQFastScan.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 0 additions & 7 deletions thirdparty/faiss/faiss/IndexPQFastScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <class C>
void IndexPQFastScan::search_implem_14(
idx_t n,
Expand Down
12 changes: 0 additions & 12 deletions thirdparty/faiss/faiss/IndexPQFastScan.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d707556

Please sign in to comment.