blob: 79aef3ee4e1cd35d99675479f38effe8ecc3ea4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// See LICENSE file in the project root for full license information.
//
#include "ClDepthwiseConvolutionFloatWorkload.hpp"
#include "backends/ClWorkloadUtils.hpp"
#include "backends/CpuTensorHandle.hpp"
namespace armnn
{
ClDepthwiseConvolutionFloatWorkload::ClDepthwiseConvolutionFloatWorkload(
const DepthwiseConvolution2dQueueDescriptor& descriptor,
const WorkloadInfo& info)
: ClDepthwiseConvolutionBaseWorkload(descriptor, info)
{
InitializeArmComputeClTensorDataForFloatTypes(*m_KernelTensor, m_Data.m_Weight);
if (m_BiasTensor)
{
InitializeArmComputeClTensorDataForFloatTypes(*m_BiasTensor, m_Data.m_Bias);
}
m_DepthwiseConvolutionLayer->prepare();
FreeUnusedTensors();
}
void ClDepthwiseConvolutionFloatWorkload::Execute() const
{
ARMNN_SCOPED_PROFILING_EVENT_CL("ClDepthwiseConvolutionFloatWorkload_Execute");
BOOST_ASSERT(m_DepthwiseConvolutionLayer);
m_DepthwiseConvolutionLayer->run();
}
} //namespace armnn
|