ArmNN
 24.02
NeonAbsWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "NeonAbsWorkload.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::NEAbsLayer::validate(&aclInput, &aclOutput);
23 }
24 
27 {
28  m_Data.ValidateInputsOutputs("NeonAbsWorkload", 1, 1);
29 
30  arm_compute::ITensor& input = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
31  arm_compute::ITensor& output = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
32 
33  m_AbsLayer.configure(&input, &output);
34 }
35 
37 {
38  ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID("NeonAbsWorkload_Execute");
39  m_AbsLayer.run();
40 }
41 
42 } // namespace armnn
armnn::AbsQueueDescriptor
Definition: WorkloadData.hpp:651
NeonAbsWorkload.hpp
armnn::NeonAbsWorkloadValidate
arm_compute::Status NeonAbsWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
Definition: NeonAbsWorkload.cpp:17
armnn::QueueDescriptor::ValidateInputsOutputs
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
Definition: WorkloadData.cpp:446
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::NeonAbsWorkload::Execute
virtual void Execute() const override
Definition: NeonAbsWorkload.cpp:36
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition: WorkloadInfo.hpp:16
PolymorphicDowncast.hpp
armnn::BoostLogSeverityMapping::info
@ info
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
ArmComputeTensorHandle.hpp
armnn::Status
Status
Definition: Types.hpp:42
armnn::NeonAbsWorkload::NeonAbsWorkload
NeonAbsWorkload(const AbsQueueDescriptor &descriptor, const WorkloadInfo &info)
Definition: NeonAbsWorkload.cpp:25
armnn::BaseWorkload< AbsQueueDescriptor >::m_Data
AbsQueueDescriptor m_Data
Definition: Workload.hpp:89
NeonWorkloadUtils.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
ArmComputeTensorUtils.hpp
ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID
#define ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
Definition: NeonWorkloadUtils.hpp:32
armnn::NeonBaseWorkload
Definition: NeonBaseWorkload.hpp:13
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26