Skip to content

Commit 8318ee1

Browse files
author
Michael Richard Mckinsey
committed
Add tuning to filename in the case of only 1 tuning
1 parent 1caa31c commit 8318ee1

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/common/Executor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,8 @@ void Executor::setupSuite()
716716
#if defined(RAJA_PERFSUITE_USE_CALIPER)
717717
KernelBase::setCaliperMgrVariant(*vid,
718718
run_params.getOutputDirName(),
719-
run_params.getAddToSpotConfig());
719+
run_params.getAddToSpotConfig(),
720+
run_params.getTuningInput());
720721
#endif
721722
}
722723

src/common/KernelBase.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ class KernelBase
398398
void doOnceCaliMetaBegin(VariantID vid, size_t tune_idx);
399399
void doOnceCaliMetaEnd(VariantID vid, size_t tune_idx);
400400
static void setCaliperMgrVariant(VariantID vid, const std::string& outdir,
401-
const std::string& addToConfig)
401+
const std::string& addToConfig,
402+
const std::vector<std::string>& tuning_input)
402403
{
403404
static bool ran_spot_config_check = false;
404405
bool config_ok = true;
@@ -532,7 +533,11 @@ class KernelBase
532533
od = outdir + "/";
533534
}
534535
std::string vstr = getVariantName(vid);
535-
std::string profile = "spot(output=" + od + vstr + ".cali)";
536+
std::string tstr = "";
537+
if (tuning_input.size() == 1) { // If only 1 tuning, add to file name
538+
tstr = "-" + tuning_input.front();
539+
}
540+
std::string profile = "spot(output=" + od + vstr + tstr + ".cali)";
536541
if(!addToConfig.empty()) {
537542
profile += "," + addToConfig;
538543
}

0 commit comments

Comments
 (0)