Skip to content

Commit

Permalink
Update the parameter parser to use the 'persistent' flag in the searc…
Browse files Browse the repository at this point in the history
…h_params struct
  • Loading branch information
achirkin committed May 14, 2024
1 parent 0879955 commit affdcb2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions cpp/bench/ann/src/raft/raft_ann_bench_param_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ void parse_search_param(const nlohmann::json& conf,
if (conf.contains("itopk")) { param.p.itopk_size = conf.at("itopk"); }
if (conf.contains("search_width")) { param.p.search_width = conf.at("search_width"); }
if (conf.contains("max_iterations")) { param.p.max_iterations = conf.at("max_iterations"); }
if (conf.contains("persistent")) { param.p.persistent = conf.at("persistent"); }
if (conf.contains("thread_block_size")) {
param.p.thread_block_size = conf.at("thread_block_size");
}
Expand All @@ -274,12 +275,5 @@ void parse_search_param(const nlohmann::json& conf,
}
// Same ratio as in IVF-PQ
param.refine_ratio = conf.value("refine_ratio", 1.0f);

uint64_t pmask = 0x8000000000000000LL;
if (conf.contains("persistent") && conf.at("persistent")) {
param.p.rand_xor_mask |= pmask;
} else {
param.p.rand_xor_mask &= ~pmask;
}
}
#endif

0 comments on commit affdcb2

Please sign in to comment.