From d80a7126b0abdd532a9f731559827a23f2e565e0 Mon Sep 17 00:00:00 2001 From: Matthew Bentham Date: Tue, 8 Jan 2019 17:52:37 +0000 Subject: Refactor: Don't include all ComputeLibrary function definitions everywhere. Just include the function definition that is specifically needed for each workload. Also, tighten up the scope where Compute Library functions are available. Knocks about 30seconds off a 4m30s single-threaded compile of the Neon workloads. Change-Id: Idac438f3bc77ff978295fbc9505cb42447def145 --- src/backends/neon/workloads/NeonSoftmaxUint8Workload.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/backends/neon/workloads/NeonSoftmaxUint8Workload.cpp') diff --git a/src/backends/neon/workloads/NeonSoftmaxUint8Workload.cpp b/src/backends/neon/workloads/NeonSoftmaxUint8Workload.cpp index cff869c9b7..f780589075 100644 --- a/src/backends/neon/workloads/NeonSoftmaxUint8Workload.cpp +++ b/src/backends/neon/workloads/NeonSoftmaxUint8Workload.cpp @@ -5,6 +5,10 @@ #include "NeonSoftmaxUint8Workload.hpp" +#include "NeonWorkloadUtils.hpp" + +#include + namespace armnn { @@ -12,7 +16,6 @@ NeonSoftmaxUint8Workload::NeonSoftmaxUint8Workload(const SoftmaxQueueDescriptor& const WorkloadInfo& info, std::shared_ptr& memoryManager) : Uint8Workload(descriptor, info) - , m_SoftmaxLayer(memoryManager) { m_Data.ValidateInputsOutputs("NeonSoftmaxUint8Workload", 1, 1); @@ -27,14 +30,16 @@ NeonSoftmaxUint8Workload::NeonSoftmaxUint8Workload(const SoftmaxQueueDescriptor& "Invalid quantization for output. Only scale = 1.0f / 256.0f and offset = 0 supported"); } - m_SoftmaxLayer.configure(&input, &output, descriptor.m_Parameters.m_Beta); + auto layer = std::make_unique(memoryManager); + layer->configure(&input, &output, descriptor.m_Parameters.m_Beta); + m_SoftmaxLayer.reset(layer.release()); } void NeonSoftmaxUint8Workload::Execute() const { ARMNN_SCOPED_PROFILING_EVENT_NEON("NeonSoftmaxUint8Workload_Execute"); - m_SoftmaxLayer.run(); + m_SoftmaxLayer->run(); } } //namespace armnn -- cgit v1.2.1