ArmNN
 22.11
ClTransposeWorkload Class Reference

#include <ClTransposeWorkload.hpp>

Inheritance diagram for ClTransposeWorkload:
ClBaseWorkload< TransposeQueueDescriptor > BaseWorkload< TransposeQueueDescriptor > IWorkload

Public Member Functions

 ClTransposeWorkload (const TransposeQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
 
void Execute () const override
 
- Public Member Functions inherited from ClBaseWorkload< TransposeQueueDescriptor >
 ClBaseWorkload (const TransposeQueueDescriptor &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< TransposeQueueDescriptor >
 BaseWorkload (const TransposeQueueDescriptor &descriptor, const WorkloadInfo &info)
 
void ExecuteAsync (ExecutionData &executionData) override
 
void PostAllocationConfigure () override
 
const TransposeQueueDescriptorGetData () const
 
arm::pipe::ProfilingGuid GetGuid () const final
 
virtual bool SupportsTensorHandleReplacement () const override
 
- Public Member Functions inherited from IWorkload
virtual ~IWorkload ()
 
virtual void RegisterDebugCallback (const DebugCallbackFunction &)
 
virtual armnn::Optional< armnn::MemoryRequirementsGetMemoryRequirements ()
 

Static Public Member Functions

static const std::string & GetName ()
 

Additional Inherited Members

- Protected Member Functions inherited from ClBaseWorkload< TransposeQueueDescriptor >
virtual void Reconfigure ()
 
- Protected Attributes inherited from BaseWorkload< TransposeQueueDescriptor >
TransposeQueueDescriptor m_Data
 
const arm::pipe::ProfilingGuid m_Guid
 

Detailed Description

Definition at line 23 of file ClTransposeWorkload.hpp.

Constructor & Destructor Documentation

◆ ClTransposeWorkload()

ClTransposeWorkload ( const TransposeQueueDescriptor descriptor,
const WorkloadInfo info,
const arm_compute::CLCompileContext &  clCompileContext 
)

Definition at line 29 of file ClTransposeWorkload.cpp.

References ARMNN_REPORT_PROFILING_WORKLOAD_DESC, ARMNN_SCOPED_PROFILING_EVENT, ClTransposeWorkload::GetName(), BaseWorkload< TransposeQueueDescriptor >::m_Data, TransposeDescriptor::m_DimMappings, QueueDescriptor::m_Inputs, QueueDescriptor::m_Outputs, QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, armnn::Undefined, and QueueDescriptor::ValidateInputsOutputs().

Referenced by ClTransposeWorkload::GetName().

32  : ClBaseWorkload<TransposeQueueDescriptor>(descriptor, info)
33 {
34  // Report Profiling Details
35  ARMNN_REPORT_PROFILING_WORKLOAD_DESC("ClTransposeWorkload_Construct",
36  descriptor.m_Parameters,
37  info,
38  this->GetGuid());
39 
41 
42  const arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
43  arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
45  {
46  ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "ClTransposeWorkload_configure");
47  // Run the layer.
48  m_PermuteFunction.configure(clCompileContext,
49  &input,
50  &output,
51  armcomputetensorutils::BuildArmComputeTransposeVector(mappings));
52  }
53 }
static const std::string & GetName()
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220
std::vector< ITensorHandle * > m_Outputs
#define ARMNN_REPORT_PROFILING_WORKLOAD_DESC(name, desc, infos, guid)
Definition: Profiling.hpp:227
std::vector< ITensorHandle * > m_Inputs
PermutationVector m_DimMappings
Indicates how to translate tensor elements from a given source into the target destination, when source and target potentially have different memory layouts e.g.

Member Function Documentation

◆ Execute()

void Execute ( ) const
overridevirtual

Implements IWorkload.

Definition at line 55 of file ClTransposeWorkload.cpp.

References ARMNN_SCOPED_PROFILING_EVENT_CL_GUID, CHECK_LOCATION, BaseWorkload< TransposeQueueDescriptor >::GetGuid(), ClTransposeWorkload::GetName(), and armnn::RunClFunction().

Referenced by ClTransposeWorkload::GetName().

56 {
57  ARMNN_SCOPED_PROFILING_EVENT_CL_GUID(GetName() + "_Execute", this->GetGuid());
58  RunClFunction(m_PermuteFunction, CHECK_LOCATION());
59 }
#define ARMNN_SCOPED_PROFILING_EVENT_CL_GUID(name, guid)
static const std::string & GetName()
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
arm::pipe::ProfilingGuid GetGuid() const final
Definition: Workload.hpp:61
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203

◆ GetName()

static const std::string& GetName ( )
inlinestatic

Definition at line 26 of file ClTransposeWorkload.hpp.

References ClTransposeWorkload::ClTransposeWorkload(), ClTransposeWorkload::Execute(), and armnn::info.

Referenced by ClTransposeWorkload::ClTransposeWorkload(), and ClTransposeWorkload::Execute().

27  {
28  static const std::string name = std::string("ClTransposeWorkload");
29  return name;
30  }

The documentation for this class was generated from the following files: