ArmNN
 21.11
NeonExpWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "NeonExpWorkload.hpp"
7 
8 #include "NeonWorkloadUtils.hpp"
9 
13 
14 namespace armnn
15 {
16 
18 {
19  const arm_compute::TensorInfo aclInput = armcomputetensorutils::BuildArmComputeTensorInfo(input);
20  const arm_compute::TensorInfo aclOutput = armcomputetensorutils::BuildArmComputeTensorInfo(output);
21 
22  return arm_compute::NEExpLayer::validate(&aclInput, &aclOutput);
23 }
24 
27 {
28  // Report Profiling Details
29  ARMNN_REPORT_PROFILING_WORKLOAD_DESC("NeonExpWorkload_Construct",
30  descriptor.m_Parameters,
31  info,
32  this->GetGuid());
33 
34  m_Data.ValidateInputsOutputs("NeonExpWorkload", 1, 1);
35 
36  arm_compute::ITensor& input = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
37  arm_compute::ITensor& output = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
38 
39  m_ExpLayer.configure(&input, &output);
40 }
41 
43 {
44  ARMNN_SCOPED_PROFILING_EVENT_NEON_GUID("NeonExpWorkload_Execute", this->GetGuid());
45  m_ExpLayer.run();
46 }
47 
48 } // namespace armnn
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
Copyright (c) 2021 ARM Limited and Contributors.
arm_compute::Status NeonExpWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
Status
enumeration
Definition: Types.hpp:29
profiling::ProfilingGuid GetGuid() const final
Definition: Workload.hpp:55
virtual void Execute() const override
std::vector< ITensorHandle * > m_Outputs
#define ARMNN_REPORT_PROFILING_WORKLOAD_DESC(name, desc, infos, guid)
Definition: Profiling.hpp:227
NeonExpWorkload(const ElementwiseUnaryQueueDescriptor &descriptor, const WorkloadInfo &info)
Contains information about TensorInfos of a layer.
std::vector< ITensorHandle * > m_Inputs
#define ARMNN_SCOPED_PROFILING_EVENT_NEON_GUID(name, guid)