ArmNN
 24.08
NeonMinimumWorkload.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 
7 
11 
12 namespace armnn
13 {
14 
16  const TensorInfo& input1,
17  const TensorInfo& output)
18 {
19  const arm_compute::TensorInfo aclInput0 = armcomputetensorutils::BuildArmComputeTensorInfo(input0);
20  const arm_compute::TensorInfo aclInput1 = armcomputetensorutils::BuildArmComputeTensorInfo(input1);
21  const arm_compute::TensorInfo aclOutput = armcomputetensorutils::BuildArmComputeTensorInfo(output);
22 
23  return arm_compute::NEElementwiseMin::validate(&aclInput0,
24  &aclInput1,
25  &aclOutput);
26 }
27 
29  const WorkloadInfo& info)
31 {
32  m_Data.ValidateInputsOutputs("NeonMinimumWorkload", 2, 1);
33 
34  arm_compute::ITensor& input0 = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
35  arm_compute::ITensor& input1 = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Inputs[1])->GetTensor();
36  arm_compute::ITensor& output = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
37 
38  m_MinLayer.configure(&input0, &input1, &output);
39 }
40 
42 {
43  ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID("NeonMinimumWorkload_Execute");
44  m_MinLayer.run();
45 }
46 
47 } //namespace armnn
armnn::NeonMinimumWorkloadValidate
arm_compute::Status NeonMinimumWorkloadValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output)
Validate function for validating the inputs and output.
Definition: NeonMinimumWorkload.cpp:15
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::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
armnn::NeonMinimumWorkload::Execute
virtual void Execute() const override
Execute the Minimum operation.
Definition: NeonMinimumWorkload.cpp:41
TensorHandle.hpp
armnn::Status
Status
Definition: Types.hpp:42
armnn::BaseWorkload< MinimumQueueDescriptor >::m_Data
MinimumQueueDescriptor m_Data
Definition: Workload.hpp:89
armnn::NeonMinimumWorkload::NeonMinimumWorkload
NeonMinimumWorkload(const MinimumQueueDescriptor &descriptor, const WorkloadInfo &info)
Create a NeonMinimumWorkload.
Definition: NeonMinimumWorkload.cpp:28
NeonMinimumWorkload.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::MinimumQueueDescriptor
Definition: WorkloadData.hpp:473
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:33
armnn::NeonBaseWorkload
Definition: NeonBaseWorkload.hpp:13
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26