ArmNN
 24.08
NeonStackWorkload Class Reference

#include <NeonStackWorkload.hpp>

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

Public Member Functions

 NeonStackWorkload (const StackQueueDescriptor &descriptor, const WorkloadInfo &info)
 
void Execute () const override
 
- Public Member Functions inherited from NeonBaseWorkload< StackQueueDescriptor >
 NeonBaseWorkload (const StackQueueDescriptor &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< StackQueueDescriptor >
 BaseWorkload (const StackQueueDescriptor &descriptor, const WorkloadInfo &info)
 
virtual const std::string & GetName () const override
 
void ExecuteAsync (ExecutionData &executionData) override
 
void PostAllocationConfigure () override
 
const StackQueueDescriptorGetData () 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< StackQueueDescriptor >
virtual void Reconfigure ()
 
- Protected Attributes inherited from BaseWorkload< StackQueueDescriptor >
StackQueueDescriptor m_Data
 
const arm::pipe::ProfilingGuid m_Guid
 
const std::string m_Name
 

Detailed Description

Definition at line 18 of file NeonStackWorkload.hpp.

Constructor & Destructor Documentation

◆ NeonStackWorkload()

NeonStackWorkload ( const StackQueueDescriptor descriptor,
const WorkloadInfo info 
)

Definition at line 49 of file NeonStackWorkload.cpp.

50 : NeonBaseWorkload<StackQueueDescriptor>(descriptor, info)
51 {
52  // Report Profiling Details
53  ARMNN_REPORT_PROFILING_WORKLOAD_DESC("NeonStackWorkload_Construct",
54  descriptor.m_Parameters,
55  info,
56  this->GetGuid());
57 
58  std::vector<arm_compute::ITensor*> aclInputs;
59  for (auto input : m_Data.m_Inputs)
60  {
61  arm_compute::ITensor& aclInput = PolymorphicPointerDowncast<IAclTensorHandle>(input)->GetTensor();
62  aclInputs.emplace_back(&aclInput);
63  }
64  arm_compute::ITensor& output = PolymorphicPointerDowncast<IAclTensorHandle>(
65  m_Data.m_Outputs[0])->GetTensor();
66 
67  m_Layer.reset(new arm_compute::NEStackLayer());
68  int aclAxis = CalcAxis(descriptor.m_Parameters.m_Axis, descriptor.m_Parameters.m_InputShape.GetNumDimensions());
69  m_Layer->configure(aclInputs, aclAxis, &output);
70 }

References ARMNN_REPORT_PROFILING_WORKLOAD_DESC, TensorShape::GetNumDimensions(), armnn::info, StackDescriptor::m_Axis, BaseWorkload< StackQueueDescriptor >::m_Data, QueueDescriptor::m_Inputs, StackDescriptor::m_InputShape, QueueDescriptor::m_Outputs, and QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters.

Member Function Documentation

◆ Execute()

void Execute ( ) const
overridevirtual

Implements IWorkload.

Definition at line 72 of file NeonStackWorkload.cpp.

73 {
74  if (m_Layer)
75  {
76  ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID("NeonStackWorkload_Execute");
77  m_Layer->run();
78  }
79 }

References ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID.


The documentation for this class was generated from the following files:
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< StackQueueDescriptor >::m_Data
StackQueueDescriptor 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