aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/workloads/ClDepthwiseConvolutionUint8Workload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/cl/workloads/ClDepthwiseConvolutionUint8Workload.cpp')
-rw-r--r--src/backends/cl/workloads/ClDepthwiseConvolutionUint8Workload.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/backends/cl/workloads/ClDepthwiseConvolutionUint8Workload.cpp b/src/backends/cl/workloads/ClDepthwiseConvolutionUint8Workload.cpp
new file mode 100644
index 0000000000..22922e4df6
--- /dev/null
+++ b/src/backends/cl/workloads/ClDepthwiseConvolutionUint8Workload.cpp
@@ -0,0 +1,40 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#include "ClDepthwiseConvolutionUint8Workload.hpp"
+
+#include <backends/CpuTensorHandle.hpp>
+
+#include "ClWorkloadUtils.hpp"
+
+namespace armnn
+{
+
+ClDepthwiseConvolutionUint8Workload::ClDepthwiseConvolutionUint8Workload(
+ const DepthwiseConvolution2dQueueDescriptor& descriptor,
+ const WorkloadInfo& info)
+ : ClDepthwiseConvolutionBaseWorkload(descriptor, info)
+{
+ InitializeArmComputeClTensorData(*m_KernelTensor, m_Data.m_Weight);
+
+ if (m_BiasTensor)
+ {
+ InitializeArmComputeClTensorData(*m_BiasTensor, m_Data.m_Bias);
+ }
+
+ m_DepthwiseConvolutionLayer->prepare();
+ FreeUnusedTensors();
+}
+
+void ClDepthwiseConvolutionUint8Workload::Execute() const
+{
+ ARMNN_SCOPED_PROFILING_EVENT_CL("ClDepthwiseConvolutionUint8Workload_Execute");
+ BOOST_ASSERT(m_DepthwiseConvolutionLayer);
+
+ m_DepthwiseConvolutionLayer->run();
+}
+
+} //namespace armnn
+