ArmNN
 25.11
Loading...
Searching...
No Matches
ClFloorFloatWorkload Class Reference

#include <ClFloorFloatWorkload.hpp>

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

Public Member Functions

 ClFloorFloatWorkload (const FloorQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
void Execute () const override
void ReplaceInputTensorHandle (ITensorHandle *tensorHandle, unsigned int slot) override
void ReplaceOutputTensorHandle (ITensorHandle *tensorHandle, unsigned int slot) override
Public Member Functions inherited from TypedWorkload< QueueDescriptor, armnn::DataType::Float16, armnn::DataType::Float32 >
 TypedWorkload (const QueueDescriptor &descriptor, const WorkloadInfo &info)
Public Member Functions inherited from BaseWorkload< QueueDescriptor >
 BaseWorkload (const QueueDescriptor &descriptor, const WorkloadInfo &info)
virtual const std::string & GetName () const override
void PostAllocationConfigure () override
const QueueDescriptorGetData () 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 ()

Additional Inherited Members

Protected Attributes inherited from BaseWorkload< QueueDescriptor >
QueueDescriptor m_Data
const arm::pipe::ProfilingGuid m_Guid
const std::string m_Name

Detailed Description

Definition at line 18 of file ClFloorFloatWorkload.hpp.

Constructor & Destructor Documentation

◆ ClFloorFloatWorkload()

ClFloorFloatWorkload ( const FloorQueueDescriptor & descriptor,
const WorkloadInfo & info,
const arm_compute::CLCompileContext & clCompileContext )

Definition at line 23 of file ClFloorFloatWorkload.cpp.

26 : FloatWorkload<FloorQueueDescriptor>(descriptor, info)
27{
28 m_Data.ValidateInputsOutputs("ClFloorFloatWorkload", 1, 1);
29
30 arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
31 arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
32 {
33 ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID("ClFloorFloatWorkload_configure");
34 m_Layer.configure(clCompileContext, &input, &output);
35 }
36}
#define ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.

References ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID, IClTensorHandle::GetTensor(), armnn::info, and BaseWorkload< QueueDescriptor >::m_Data.

Member Function Documentation

◆ Execute()

void Execute ( ) const
overridevirtual

Implements IWorkload.

Definition at line 38 of file ClFloorFloatWorkload.cpp.

39{
40 ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID("ClFloorFloatWorkload_Execute");
41 RunClFunction(m_Layer, CHECK_LOCATION());
42}
#define CHECK_LOCATION()
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)

References ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID, CHECK_LOCATION, and armnn::RunClFunction().

◆ ReplaceInputTensorHandle()

void ReplaceInputTensorHandle ( ITensorHandle * tensorHandle,
unsigned int slot )
overridevirtual

Reimplemented from BaseWorkload< QueueDescriptor >.

Definition at line 44 of file ClFloorFloatWorkload.cpp.

45{
46 ITensorHandle* backupHandle = this->m_Data.m_Inputs[slot];
47 this->m_Data.m_Inputs[slot] = tensorHandle;
48 try
49 {
50 Reconfigure();
51 }
52 catch(armnn::UnimplementedException& e)
53 {
54 // Cannot reconfigure, revert the slot back and throw the exception.
55 this->m_Data.m_Inputs[slot] = backupHandle;
56 throw e;
57 }
58}

References BaseWorkload< QueueDescriptor >::m_Data.

◆ ReplaceOutputTensorHandle()

void ReplaceOutputTensorHandle ( ITensorHandle * tensorHandle,
unsigned int slot )
overridevirtual

Reimplemented from BaseWorkload< QueueDescriptor >.

Definition at line 61 of file ClFloorFloatWorkload.cpp.

62{
63 ITensorHandle* backupHandle = this->m_Data.m_Inputs[slot];
64 this->m_Data.m_Inputs[slot] = tensorHandle;
65 try
66 {
67 Reconfigure();
68 }
69 catch(armnn::UnimplementedException& e)
70 {
71 // Cannot reconfigure, revert the slot back and throw the exception.
72 this->m_Data.m_Inputs[slot] = backupHandle;
73 throw e;
74 }
75}

References BaseWorkload< QueueDescriptor >::m_Data.


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