Parse CALI_CONFIG for Configuration Parameters #501
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR is a bugfix, preventing an issue where two caliper files are generated from a single run of RAJAPerf.
It does the following:
src/common/KernelBase.cpp
to parse theCALI_CONFIG
, removing any provided filename, and passing the other variables correctly into the config manager.CALI_CONFIG
environment variable, disabling the default config manger.Explanation
The
CALI_CONFIG
environment variable enables activating one (or more) of Caliper's built-in performance profiling configurations. For the Caliper implementation in RAJAPerf, we manage the configuration separately for each variant-tuning combination. This means we generate a separate Caliper file for each variant-tuning combination. AllowingCALI_CONFIG
to be set, means allowing usage such asCALI_CONFIG="spot(output=my_file.cali)" raja-perf --variants Base_CUDA --tunings block_128 block 256
, resulting in 3 Caliper filesBase_CUDA-block_128.cali
,Base_CUDA-block_256.cali
, andmy_file.cali
, which does not make sense.We allow modification of the Caliper configuration through the
--add-to-spot-config
and--add-to-cali-config
arguments, while this PR essentially passes the parameters in theCALI_CONFIG
through the same channels as these arguments.Example
Example 1 - many parameters
When there are configuration parameters provided in both
CALI_CONFIG
and through the command line arguments,--add-to-cali-config
and--add-to-spot-config
, the parameters are merged into one configProfile: spot(output=/g/g20/mckinsey/tmp/nvhpc_rajaperf/RAJAPerf/scripts/bin/lassen_scripts/1/131072/data/RAJA_CUDA-block_256.cali,profile.cuda,time.exclusive,mem.highwatermark),profile.mpi
results in:
Example 2 - No command line arguments
If only
output=my_file.cali
is provided, theCALI_CONFIG
will be ignored.Example 3 - multiple tunings in benchpark
Running RAJAPerf without the
--variant
and--tuning
arguments automatically runs all available variant/tuning combinations, which results in a cali file per combination. We can see that providing a single file name does not make sense in this case.