simplify and refactor create_servicelab_experiment utility (#3867)

Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3867

`create_servicelab_experiment`'s metrics' key calculation and benchmarks were specific to scalar quantizer. Refactor it so we can reuse the same utility for RCQ. Fix the previous naming suggestion for the position of `_profile` in the experiment name as well

Reviewed By: junjieqi

Differential Revision: D62770846

fbshipit-source-id: 52422138df6f32ca8f2319369cb9f6675e8b3bdf
pull/3854/head
Mengdi Lin 2024-09-17 08:18:44 -07:00 committed by Facebook GitHub Bot
parent 83d0599e19
commit 73a41f146f
4 changed files with 4 additions and 20 deletions

View File

@ -6,7 +6,6 @@
*/
#include <faiss/perf_tests/utils.h>
#include <fmt/format.h>
#include <gflags/gflags.h>
#include <cstdio>
#include <map>
@ -76,7 +75,7 @@ int main(int argc, char** argv) {
for (auto& [bench_name, quantizer_type] : benchs) {
benchmark::RegisterBenchmark(
fmt::format("{}_{}d_{}n", bench_name, d, n).c_str(),
bench_name.c_str(),
bench_reconstruction_error,
quantizer_type,
d,

View File

@ -6,7 +6,6 @@
*/
#include <faiss/perf_tests/utils.h>
#include <fmt/format.h>
#include <gflags/gflags.h>
#include <omp.h>
#include <cstdio>
@ -63,11 +62,7 @@ int main(int argc, char** argv) {
for (auto& [bench_name, quantizer_type] : benchs) {
benchmark::RegisterBenchmark(
fmt::format("{}_{}d_{}n", bench_name, d, n).c_str(),
bench_decode,
quantizer_type,
d,
n)
bench_name.c_str(), bench_decode, quantizer_type, d, n)
->Iterations(iterations);
}

View File

@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/
#include <fmt/format.h>
#include <gflags/gflags.h>
#include <omp.h>
#include <cstdio>
@ -72,11 +71,7 @@ int main(int argc, char** argv) {
for (auto& [bench_name, quantizer_type] : benchs) {
benchmark::RegisterBenchmark(
fmt::format("{}_{}d_{}n", bench_name, d, n).c_str(),
bench_distance,
quantizer_type,
d,
n)
bench_name.c_str(), bench_distance, quantizer_type, d, n)
->Iterations(iterations);
}
benchmark::RunSpecifiedBenchmarks();

View File

@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/
#include <fmt/format.h>
#include <gflags/gflags.h>
#include <omp.h>
#include <cstdio>
@ -57,11 +56,7 @@ int main(int argc, char** argv) {
for (auto& [bench_name, quantizer_type] : benchs) {
benchmark::RegisterBenchmark(
fmt::format("{}_{}d_{}n", bench_name, d, n).c_str(),
bench_encode,
quantizer_type,
d,
n)
bench_name.c_str(), bench_encode, quantizer_type, d, n)
->Iterations(iterations);
}