aboutsummaryrefslogtreecommitdiff
path: root/src/graph
diff options
context:
space:
mode:
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)