ArmNN
 24.08
NeonReverseV2Workload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 #include "NeonWorkloadUtils.hpp"
11 
12 namespace armnn
13 {
15  const TensorInfo& axis,
16  const TensorInfo& output)
17 {
18  const arm_compute::TensorInfo aclInput = BuildArmComputeTensorInfo(input);
19  const arm_compute::TensorInfo aclAxis = BuildArmComputeTensorInfo(axis);
20  const arm_compute::TensorInfo aclOutput = BuildArmComputeTensorInfo(output);
21 
22  return arm_compute::NEReverse::validate(&aclInput, &aclOutput, &aclAxis, true);
23 }
24 
26  const WorkloadInfo& info)
28 {
29  m_Data.ValidateInputsOutputs("NeonReverseV2Workload", 2, 1);
30 
31  arm_compute::ITensor& input = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
32  arm_compute::ITensor& axis = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Inputs[1])->GetTensor();
33  arm_compute::ITensor& output = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
34 
35  m_Layer.configure(&input, &output, &axis, true);
36 }
37 
39 {
40  ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID("NeonReverseV2Workload_Execute");
41  m_Layer.run();
42 }
43 
44 } // namespace armnn
armnn::NeonReverseV2WorkloadValidate
arm_compute::Status NeonReverseV2WorkloadValidate(const TensorInfo &input, const TensorInfo &axis, const TensorInfo &output)
Definition: NeonReverseV2Workload.cpp:14
NeonReverseV2Workload.hpp
WorkloadUtils.hpp
armnn::QueueDescriptor::ValidateInputsOutputs
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
Definition: WorkloadData.cpp:447
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::ReverseV2QueueDescriptor
Definition: WorkloadData.hpp:758
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition: WorkloadInfo.hpp:16
PolymorphicDowncast.hpp
ArmComputeUtils.hpp
armnn::BoostLogSeverityMapping::info
@ info
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
armnn::BaseWorkload
Definition: Workload.hpp:33
armnn::Status
Status
Definition: Types.hpp:42
armnn::BaseWorkload< ReverseV2QueueDescriptor >::m_Data
ReverseV2QueueDescriptor m_Data
Definition: Workload.hpp:89
NeonWorkloadUtils.hpp
armnn::NeonReverseV2Workload::NeonReverseV2Workload
NeonReverseV2Workload(const ReverseV2QueueDescriptor &descriptor, const WorkloadInfo &info)
Definition: NeonReverseV2Workload.cpp:25
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::NeonReverseV2Workload::Execute
void Execute() const override
Definition: NeonReverseV2Workload.cpp:38
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:33
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26