From 9527c89c3087b4c92bd988340c3b25c1c5e70d8f Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Wed, 22 Nov 2017 20:53:20 +0100 Subject: Made parameter override in the clients a command-line argument and added support for multi-kernel routines --- test/performance/client.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test/performance/client.cpp') diff --git a/test/performance/client.cpp b/test/performance/client.cpp index b2b579b1..8b18b9a9 100644 --- a/test/performance/client.cpp +++ b/test/performance/client.cpp @@ -146,6 +146,13 @@ Arguments Client::ParseArguments(int argc, char *argv[], const size_t le args.no_abbrv = CheckArgument(command_line_args, help, kArgNoAbbreviations); warm_up_ = CheckArgument(command_line_args, help, kArgWarmUp); + // Parse the optional JSON file name arguments + const auto tuner_files_default = std::string{""}; + const auto tuner_files_string = GetArgument(command_line_args, help, kArgTunerFiles, tuner_files_default); + if (tuner_files_string != tuner_files_default) { + args.tuner_files = split(tuner_files_string, ','); + } + // Prints the chosen (or defaulted) arguments to screen. This also serves as the help message, // which is thus always displayed (unless silence is specified). if (!args.silent) { fprintf(stdout, "%s\n", help.c_str()); } @@ -196,8 +203,8 @@ void Client::PerformanceTest(Arguments &args, const SetMetric set_sizes) if (args.compare_cublas) { cublasSetup(args); } #endif - // Optionally overrides parameters if "CLBLAST_JSON_FILE_OVERRIDE" environmental variable is set - OverrideParametersFromJSONFiles(device(), args.precision); + // Optionally overrides parameters if tuner files are given (semicolon separated) + OverrideParametersFromJSONFiles(args.tuner_files, device(), args.precision); // Prints the header of the output table PrintTableHeader(args); -- cgit v1.2.3