From a1be5ba07b344794a649510b9bb20968df204f6e Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Tue, 10 Apr 2018 16:53:02 +0100 Subject: 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 Reviewed-by: Pablo Tello --- src/graph/backends/NEON/NEDeviceBackend.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/graph') 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) -- cgit v1.2.1