aboutsummaryrefslogtreecommitdiff
path: root/src/graph
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-04-10 16:53:02 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:49:16 +0000
commita1be5ba07b344794a649510b9bb20968df204f6e (patch)
tree2f16427030127eccaea0f828adb414eb432d94c1 /src/graph
parent50b2254066fe794676e82316fdd81fec0ad68250 (diff)
downloadComputeLibrary-a1be5ba07b344794a649510b9bb20968df204f6e.tar.gz
COMPMID-959: Number of threads was overwritten in benchmark_graph tests
RunExample would set the number of threads specified on the command line then the default graph config was overwriting it with the default hint. Now the default config of the graph only sets the number of threads if explicitly requested by the user. Change-Id: Ibc945e790abe8f16afd89e2a40cbe07bf0966e84 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/127301 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'src/graph')
-rw-r--r--src/graph/backends/NEON/NEDeviceBackend.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/graph/backends/NEON/NEDeviceBackend.cpp b/src/graph/backends/NEON/NEDeviceBackend.cpp
index 87f88dffdf..aaf05829bb 100644
--- a/src/graph/backends/NEON/NEDeviceBackend.cpp
+++ b/src/graph/backends/NEON/NEDeviceBackend.cpp
@@ -65,7 +65,10 @@ void NEDeviceBackend::initialize_backend()
void NEDeviceBackend::setup_backend_context(GraphContext &ctx)
{
// Set number of threads
- Scheduler::get().set_num_threads(ctx.config().num_threads);
+ if(ctx.config().num_threads >= 0)
+ {
+ Scheduler::get().set_num_threads(ctx.config().num_threads);
+ }
// Create function level memory manager
if(ctx.memory_management_ctx(Target::NEON) == nullptr)