aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-07-13 09:26:51 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit9452233e0322c4d2801dfedb5194acf7ff6d6af2 (patch)
treedb9b59eb39d51cccead3fe0fa6a751a375b4312f /tests
parent2ec14f5a52d28eded07ddd015a188f8e691227d7 (diff)
downloadComputeLibrary-9452233e0322c4d2801dfedb5194acf7ff6d6af2.tar.gz
COMPMID-1398: Removed --threads from CommonOptions
Otherwise --threads appear twice for benchmark_graph_* tests Change-Id: I4f5454f6a2fda2558386290583a0ab84cd4666bb Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/139827 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmark_examples/RunExample.cpp4
-rw-r--r--tests/framework/command_line/CommonOptions.cpp2
-rw-r--r--tests/framework/command_line/CommonOptions.h1
-rw-r--r--tests/main.cpp6
-rw-r--r--tests/validate_examples/RunExample.cpp3
5 files changed, 4 insertions, 12 deletions
diff --git a/tests/benchmark_examples/RunExample.cpp b/tests/benchmark_examples/RunExample.cpp
index 81c879ff2d..de3e796d59 100644
--- a/tests/benchmark_examples/RunExample.cpp
+++ b/tests/benchmark_examples/RunExample.cpp
@@ -106,9 +106,6 @@ int run_example(int argc, char **argv, std::unique_ptr<Example> example)
g_example_argv.emplace_back(const_cast<char *>(arg.c_str())); // NOLINT
}
- // Set number of threads in Scheduler
- Scheduler::get().set_num_threads(options.threads->value());
-
if(options.log_level->value() > framework::LogLevel::NONE)
{
for(auto &p : printers)
@@ -137,7 +134,6 @@ int run_example(int argc, char **argv, std::unique_ptr<Example> example)
}
#endif /* ARM_COMPUTE_CL */
p->print_entry("Iterations", support::cpp11::to_string(options.iterations->value()));
- p->print_entry("Threads", support::cpp11::to_string(options.threads->value()));
}
}
diff --git a/tests/framework/command_line/CommonOptions.cpp b/tests/framework/command_line/CommonOptions.cpp
index f1c140e6fe..fee18f6386 100644
--- a/tests/framework/command_line/CommonOptions.cpp
+++ b/tests/framework/command_line/CommonOptions.cpp
@@ -39,7 +39,6 @@ CommonOptions::CommonOptions(CommandLineParser &parser)
: help(parser.add_option<ToggleOption>("help")),
instruments(),
iterations(parser.add_option<SimpleOption<int>>("iterations", 1)),
- threads(parser.add_option<SimpleOption<int>>("threads", 1)),
log_format(),
log_file(parser.add_option<SimpleOption<std::string>>("log-file")),
log_level(),
@@ -87,7 +86,6 @@ CommonOptions::CommonOptions(CommandLineParser &parser)
help->set_help("Show this help message");
instruments->set_help("Set the profiling instruments to use");
iterations->set_help("Number of iterations per test case");
- threads->set_help("Number of threads to use");
log_format->set_help("Output format for measurements and failures (affects only log-file)");
log_file->set_help("Write output to file instead of to the console (affected by log-format)");
log_level->set_help("Verbosity of the output");
diff --git a/tests/framework/command_line/CommonOptions.h b/tests/framework/command_line/CommonOptions.h
index b29c1d8dd5..f4646a0299 100644
--- a/tests/framework/command_line/CommonOptions.h
+++ b/tests/framework/command_line/CommonOptions.h
@@ -74,7 +74,6 @@ public:
arm_compute::utils::ToggleOption *help; /**< Show help option */
arm_compute::utils::EnumListOption<InstrumentsDescription> *instruments; /**< Instruments option */
arm_compute::utils::SimpleOption<int> *iterations; /**< Number of iterations option */
- arm_compute::utils::SimpleOption<int> *threads; /**< Number of threads option */
arm_compute::utils::EnumOption<LogFormat> *log_format; /**< Log format option */
arm_compute::utils::SimpleOption<std::string> *log_file; /**< Log file option */
arm_compute::utils::EnumOption<LogLevel> *log_level; /**< Logging level option */
diff --git a/tests/main.cpp b/tests/main.cpp
index 596838927a..2da6804c60 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -107,6 +107,8 @@ int main(int argc, char **argv)
auto enable_tuner = parser.add_option<utils::ToggleOption>("enable-tuner");
enable_tuner->set_help("Enable OpenCL dynamic tuner");
#endif /* ARM_COMPUTE_CL */
+ auto threads = parser.add_option<utils::SimpleOption<int>>("threads", 1);
+ threads->set_help("Number of threads to use");
try
{
@@ -120,7 +122,7 @@ int main(int argc, char **argv)
std::vector<std::unique_ptr<framework::Printer>> printers = options.create_printers();
- Scheduler::get().set_num_threads(options.threads->value());
+ Scheduler::get().set_num_threads(threads->value());
#ifdef ARM_COMPUTE_CL
if(enable_tuner->is_set())
{
@@ -152,7 +154,7 @@ int main(int argc, char **argv)
}
#endif /* ARM_COMPUTE_CL */
p->print_entry("Iterations", support::cpp11::to_string(options.iterations->value()));
- p->print_entry("Threads", support::cpp11::to_string(options.threads->value()));
+ p->print_entry("Threads", support::cpp11::to_string(threads->value()));
{
using support::cpp11::to_string;
p->print_entry("Dataset mode", to_string(dataset_mode->value()));
diff --git a/tests/validate_examples/RunExample.cpp b/tests/validate_examples/RunExample.cpp
index d842c5bd6f..9ce41c2768 100644
--- a/tests/validate_examples/RunExample.cpp
+++ b/tests/validate_examples/RunExample.cpp
@@ -124,8 +124,6 @@ int run_example(int argc, char **argv, std::unique_ptr<ValidateExample> example)
g_example_argv.emplace_back(const_cast<char *>(arg.c_str())); // NOLINT
}
- // Set number of threads in Scheduler
- Scheduler::get().set_num_threads(options.threads->value());
library = support::cpp14::make_unique<AssetsLibrary>("." /* Only using random values */, seed->value());
if(options.log_level->value() > framework::LogLevel::NONE)
@@ -157,7 +155,6 @@ int run_example(int argc, char **argv, std::unique_ptr<ValidateExample> example)
}
#endif /* ARM_COMPUTE_CL */
p->print_entry("Iterations", support::cpp11::to_string(options.iterations->value()));
- p->print_entry("Threads", support::cpp11::to_string(options.threads->value()));
g_example->print_parameters(*p);
}
}