aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmark_examples
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-02-07 14:00:05 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:45:44 +0000
commit3364c4ca658d44f449a8d3d6e9eee31d90254f15 (patch)
tree04ad1a5c074888a9327e77d2b21dd26b32e95cd4 /tests/benchmark_examples
parentc799ed85bcf0b18269e65a64f34382073a68bd93 (diff)
downloadComputeLibrary-3364c4ca658d44f449a8d3d6e9eee31d90254f15.tar.gz
COMPMID-893: Fix segfault in graph_squeezenet_v1_1
Number of threads in the scheduler were set after example configuration leading to memory corruption in case more threads were used. Change-Id: I221a026196cd64f1805d31596f0488a247a4bfab Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/119196 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Isabella Gottardi <isabella.gottardi@arm.com>
Diffstat (limited to 'tests/benchmark_examples')
-rw-r--r--tests/benchmark_examples/RunExample.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/benchmark_examples/RunExample.cpp b/tests/benchmark_examples/RunExample.cpp
index dea9d9b2e3..7ec6217d19 100644
--- a/tests/benchmark_examples/RunExample.cpp
+++ b/tests/benchmark_examples/RunExample.cpp
@@ -88,6 +88,10 @@ int run_example(int argc, char **argv, Example &example)
{
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());
+
// We need to do the setup here because framework.init() will need CL / GLES to be initialised
try
{
@@ -112,8 +116,6 @@ int run_example(int argc, char **argv, Example &example)
return 1;
}
- Scheduler::get().set_num_threads(options.threads->value());
-
if(options.log_level->value() > framework::LogLevel::NONE)
{
for(auto &p : printers)