ArmNN
 24.02
NeonRsqrtWorkload.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 "NeonRsqrtWorkload.hpp"
7 
8 #include "NeonWorkloadUtils.hpp"
9 
13 
14 
15 namespace armnn
16 {
17 
19 {
20  const arm_compute::TensorInfo aclInput = armcomputetensorutils::BuildArmComputeTensorInfo(input);
21  const arm_compute::TensorInfo aclOutput = armcomputetensorutils::BuildArmComputeTensorInfo(output);
22 
23  return arm_compute::NERsqrtLayer::validate(&aclInput, &aclOutput);
24 }
25 
28 {
29  m_Data.ValidateInputsOutputs("NeonRsqrtWorkload", 1, 1);
30 
31  arm_compute::ITensor& input = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
32  arm_compute::ITensor& output = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
33 
34  m_RsqrtLayer.configure(&input, &output);
35 }
36 
38 {
39  ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID("NeonRsqrtWorkload_Execute");
40  m_RsqrtLayer.run();
41 }
42 
43 } // namespace armnn
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::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition: WorkloadInfo.hpp:16
PolymorphicDowncast.hpp
armnn::RsqrtQueueDescriptor
Definition: WorkloadData.hpp:497
NeonRsqrtWorkload.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::BaseWorkload< RsqrtQueueDescriptor >::m_Data
RsqrtQueueDescriptor m_Data
Definition: Workload.hpp:89
armnn::NeonRsqrtWorkload::NeonRsqrtWorkload
NeonRsqrtWorkload(const RsqrtQueueDescriptor &descriptor, const WorkloadInfo &info)
Definition: NeonRsqrtWorkload.cpp:26
armnn::NeonRsqrtWorkloadValidate
arm_compute::Status NeonRsqrtWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
Definition: NeonRsqrtWorkload.cpp:18
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::NeonRsqrtWorkload::Execute
virtual void Execute() const override
Definition: NeonRsqrtWorkload.cpp:37
armnn::NeonBaseWorkload
Definition: NeonBaseWorkload.hpp:13
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26