blob: 58d606153754e64dbcd764595b7ebc700c8fca49 (
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
39
40
41
42
43
44
45
46
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// See LICENSE file in the project root for full license information.
//
#include "NeonDepthwiseConvolutionBaseWorkload.hpp"
#include "backends/ArmComputeTensorUtils.hpp"
namespace armnn
{
arm_compute::Status NeonDepthwiseConvolutionWorkloadValidate(const TensorInfo& input,
const TensorInfo& output,
const DepthwiseConvolution2dDescriptor& descriptor,
const TensorInfo& weights,
const TensorInfo& biases)
{
const arm_compute::TensorInfo aclInputInfo =
armcomputetensorutils::BuildArmComputeTensorInfo(input);
const arm_compute::TensorInfo aclOutputInfo =
armcomputetensorutils::BuildArmComputeTensorInfo(output);
const arm_compute::TensorInfo aclWeightsInfo =
armcomputetensorutils::BuildArmComputeTensorInfo(weights);
arm_compute::TensorInfo aclBiasesInfo;
arm_compute::TensorInfo *optionalAclBiasesInfo = nullptr;
if (descriptor.m_BiasEnabled)
{
aclBiasesInfo = armcomputetensorutils::BuildArmComputeTensorInfo(biases);
optionalAclBiasesInfo = &aclBiasesInfo;
}
const arm_compute::PadStrideInfo aclPadStrideInfo =
armcomputetensorutils::BuildArmComputePadStrideInfo(descriptor);
const unsigned int aclDepthMultiplier = weights.GetShape()[0];
return arm_compute::NEDepthwiseConvolutionLayer::validate(&aclInputInfo,
&aclWeightsInfo,
optionalAclBiasesInfo,
&aclOutputInfo,
aclPadStrideInfo,
aclDepthMultiplier);
}
}
|