From aee2c67e1536288beee017ccf8dcd5fd233f708a Mon Sep 17 00:00:00 2001 From: Lior Paz Date: Tue, 26 Mar 2024 01:59:53 +0200 Subject: [PATCH] TOOLS: Add perftest msg_size mult factor --- tools/perf/ucc_pt_benchmark.cc | 2 +- tools/perf/ucc_pt_config.cc | 5 +++++ tools/perf/ucc_pt_config.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/perf/ucc_pt_benchmark.cc b/tools/perf/ucc_pt_benchmark.cc index cbaa5d664a..e5c1fa1e68 100644 --- a/tools/perf/ucc_pt_benchmark.cc +++ b/tools/perf/ucc_pt_benchmark.cc @@ -98,7 +98,7 @@ ucc_status_t ucc_pt_benchmark::run_bench() noexcept double time; print_header(); - for (size_t cnt = min_count; cnt <= max_count; cnt *= 2) { + for (size_t cnt = min_count; cnt <= max_count; cnt *= config.mult_factor) { size_t coll_size = cnt * ucc_dt_size(config.dt); int iter = config.n_iter_small; int warmup = config.n_warmup_small; diff --git a/tools/perf/ucc_pt_config.cc b/tools/perf/ucc_pt_config.cc index e59b62ce26..08469483e3 100644 --- a/tools/perf/ucc_pt_config.cc +++ b/tools/perf/ucc_pt_config.cc @@ -29,6 +29,7 @@ ucc_pt_config::ucc_pt_config() { bench.n_bufs = UCC_PT_DEFAULT_N_BUFS; bench.root = 0; bench.root_shift = 0; + bench.mult_factor = 2; comm.mt = bench.mt; } @@ -153,6 +154,9 @@ ucc_status_t ucc_pt_config::process_args(int argc, char *argv[]) std::stringstream(optarg) >> bench.n_warmup_small; bench.n_warmup_large = bench.n_warmup_small; break; + case 'f': + std::stringstream(optarg) >> bench.mult_factor; + break; case 'N': std::stringstream(optarg) >> bench.n_bufs; break; @@ -191,6 +195,7 @@ void ucc_pt_config::print_help() std::cout << " -m : memory type"<: number of iterations"<: number of warmup iterations"<: multiplication factor between sizes. Default : 2."<: number of buffers"<