ArmNN
 24.08
NeonDetectionPostProcessWorkload Class Reference

#include <NeonDetectionPostProcessWorkload.hpp>

Inheritance diagram for NeonDetectionPostProcessWorkload:
[legend]
Collaboration diagram for NeonDetectionPostProcessWorkload:
[legend]

Public Member Functions

 NeonDetectionPostProcessWorkload (const DetectionPostProcessQueueDescriptor &descriptor, const WorkloadInfo &info)
 
virtual void Execute () const override
 
- Public Member Functions inherited from NeonBaseWorkload< DetectionPostProcessQueueDescriptor >
 NeonBaseWorkload (const DetectionPostProcessQueueDescriptor &descriptor, const WorkloadInfo &info)
 
void ReplaceInputTensorHandle (ITensorHandle *tensorHandle, unsigned int slot) override
 
void ReplaceOutputTensorHandle (ITensorHandle *tensorHandle, unsigned int slot) override
 
- Public Member Functions inherited from BaseWorkload< DetectionPostProcessQueueDescriptor >
 BaseWorkload (const DetectionPostProcessQueueDescriptor &descriptor, const WorkloadInfo &info)
 
virtual const std::string & GetName () const override
 
void ExecuteAsync (ExecutionData &executionData) override
 
void PostAllocationConfigure () override
 
const DetectionPostProcessQueueDescriptorGetData () const
 
arm::pipe::ProfilingGuid GetGuid () const final
 
virtual bool SupportsTensorHandleReplacement () const override
 
- Public Member Functions inherited from IWorkload
virtual ~IWorkload ()
 
virtual arm::pipe::ProfilingGuid GetGuid () const =0
 
virtual bool SupportsTensorHandleReplacement () const =0
 
virtual const std::string & GetName () const =0
 
virtual void RegisterDebugCallback (const DebugCallbackFunction &)
 
virtual armnn::Optional< armnn::MemoryRequirementsGetMemoryRequirements ()
 

Additional Inherited Members

- Protected Member Functions inherited from NeonBaseWorkload< DetectionPostProcessQueueDescriptor >
virtual void Reconfigure ()
 
- Protected Attributes inherited from BaseWorkload< DetectionPostProcessQueueDescriptor >
DetectionPostProcessQueueDescriptor m_Data
 
const arm::pipe::ProfilingGuid m_Guid
 
const std::string m_Name
 

Detailed Description

Definition at line 25 of file NeonDetectionPostProcessWorkload.hpp.

Constructor & Destructor Documentation

◆ NeonDetectionPostProcessWorkload()

Definition at line 75 of file NeonDetectionPostProcessWorkload.cpp.

78  : NeonBaseWorkload<DetectionPostProcessQueueDescriptor>(descriptor, info)
79 {
80  // Report Profiling Details
81  ARMNN_REPORT_PROFILING_WORKLOAD_DESC("NeonDetectionPostProcessWorkload_Construct",
82  descriptor.m_Parameters,
83  info,
84  this->GetGuid());
85 
86  m_Anchors = std::make_unique<arm_compute::Tensor>();
87  BuildArmComputeTensor(*m_Anchors, descriptor.m_Anchors->GetTensorInfo());
88 
89  arm_compute::DetectionPostProcessLayerInfo di = MakeInfo(m_Data.m_Parameters);
90 
91  auto AclTensorRef = [](ITensorHandle* tensor) -> arm_compute::ITensor&
92  {
93  return PolymorphicDowncast<IAclTensorHandle*>(tensor)->GetTensor();
94  };
95 
96  arm_compute::ITensor& boxEncodings = AclTensorRef(m_Data.m_Inputs[0]);
97  arm_compute::ITensor& scores = AclTensorRef(m_Data.m_Inputs[1]);
98 
99  arm_compute::ITensor& detectionBoxes = AclTensorRef(m_Data.m_Outputs[0]);
100  arm_compute::ITensor& detectionClasses = AclTensorRef(m_Data.m_Outputs[1]);
101  arm_compute::ITensor& detectionScores = AclTensorRef(m_Data.m_Outputs[2]);
102  arm_compute::ITensor& numDetections = AclTensorRef(m_Data.m_Outputs[3]);
103 
104  m_Func.configure(&boxEncodings, &scores, m_Anchors.get(),
105  &detectionBoxes, &detectionClasses, &detectionScores, &numDetections,
106  di);
107 
109 }

References ARMNN_REPORT_PROFILING_WORKLOAD_DESC, armnn::info, and QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters.

Member Function Documentation

◆ Execute()

void Execute ( ) const
overridevirtual

Implements IWorkload.

Definition at line 111 of file NeonDetectionPostProcessWorkload.cpp.

112 {
113  ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID("NeonDetectionPostProcessWorkload_Execute");
114  m_Func.run();
115 }

References ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID.


The documentation for this class was generated from the following files:
armnn::MakeInfo
arm_compute::DetectionPostProcessLayerInfo MakeInfo(const DetectionPostProcessDescriptor &descriptor)
Definition: NeonDetectionPostProcessWorkload.cpp:17
armnn::DetectionPostProcessQueueDescriptor::m_Anchors
const ConstTensorHandle * m_Anchors
Definition: WorkloadData.hpp:246
armnn::InitializeArmComputeTensorData
void InitializeArmComputeTensorData(arm_compute::Tensor &tensor, TensorInfo tensorInfo, const ITensorHandle *handle)
Definition: NeonWorkloadUtils.hpp:69
armnn::QueueDescriptorWithParameters::m_Parameters
LayerDescriptor m_Parameters
Definition: WorkloadData.hpp:66
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
ARMNN_REPORT_PROFILING_WORKLOAD_DESC
#define ARMNN_REPORT_PROFILING_WORKLOAD_DESC(name, desc, infos, guid)
Definition: Profiling.hpp:227
armnn::BaseWorkload< DetectionPostProcessQueueDescriptor >::m_Data
DetectionPostProcessQueueDescriptor m_Data
Definition: Workload.hpp:89
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