ArmNN
 20.08
RefSoftmaxWorkload Class Reference

#include <RefSoftmaxWorkload.hpp>

Inheritance diagram for RefSoftmaxWorkload:
BaseWorkload< SoftmaxQueueDescriptor > IWorkload

Public Member Functions

virtual void Execute () const override
 
- Public Member Functions inherited from BaseWorkload< SoftmaxQueueDescriptor >
 BaseWorkload (const SoftmaxQueueDescriptor &descriptor, const WorkloadInfo &info)
 
void PostAllocationConfigure () override
 
const SoftmaxQueueDescriptorGetData () const
 
profiling::ProfilingGuid GetGuid () const final
 
- Public Member Functions inherited from IWorkload
virtual ~IWorkload ()
 
virtual void RegisterDebugCallback (const DebugCallbackFunction &)
 

Additional Inherited Members

- Protected Attributes inherited from BaseWorkload< SoftmaxQueueDescriptor >
const SoftmaxQueueDescriptor m_Data
 
const profiling::ProfilingGuid m_Guid
 

Detailed Description

Definition at line 14 of file RefSoftmaxWorkload.hpp.

Member Function Documentation

◆ Execute()

void Execute ( ) const
overridevirtual

Implements IWorkload.

Definition at line 20 of file RefSoftmaxWorkload.cpp.

References ARMNN_SCOPED_PROFILING_EVENT, armnn::CpuRef, armnn::GetTensorInfo(), SoftmaxDescriptor::m_Axis, SoftmaxDescriptor::m_Beta, BaseWorkload< SoftmaxQueueDescriptor >::m_Data, QueueDescriptor::m_Inputs, QueueDescriptor::m_Outputs, QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, and armnn::Softmax.

21 {
22  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefSoftmaxWorkload_Execute");
23 
24  const TensorInfo &inputTensorInfo = GetTensorInfo(m_Data.m_Inputs[0]);
25 
26  std::unique_ptr<Decoder<float>> decoderPtr = MakeDecoder<float>(inputTensorInfo, m_Data.m_Inputs[0]->Map());
27  Decoder<float> &decoder = *decoderPtr;
28 
29  const TensorInfo &outputTensorInfo = GetTensorInfo(m_Data.m_Outputs[0]);
30 
31  std::unique_ptr<Encoder<float>> encoderPtr = MakeEncoder<float>(outputTensorInfo, m_Data.m_Outputs[0]->Map());
32  Encoder<float> &encoder = *encoderPtr;
33 
34  Softmax(decoder,
35  encoder,
36  inputTensorInfo,
39 }
int m_Axis
Scalar, defaulted to the last index (-1), specifying the dimension the activation will be performed o...
CPU Execution: Reference C++ kernels.
const SoftmaxQueueDescriptor m_Data
Definition: Workload.hpp:46
float m_Beta
Exponentiation value.
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:169
std::vector< ITensorHandle * > m_Outputs
std::vector< ITensorHandle * > m_Inputs
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers

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