Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused stats in PQFastScan #180

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading