From de36e4a9c299028e792c3a5bd99ad0816d806077 Mon Sep 17 00:00:00 2001 From: Ryan OShea Date: Fri, 13 Mar 2020 16:26:19 +0000 Subject: IVGCVSW-3726 Upload ArmNN Doxygen files * Upload current ArmNN Doxygen files Signed-off-by: Ryan OShea Change-Id: I8989ed16ee40a99a4495b100bd009cf3e24a7285 --- ...lassarmnn_1_1_neon_softmax_uint8_workload.xhtml | 247 +++++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 Documentation/classarmnn_1_1_neon_softmax_uint8_workload.xhtml (limited to 'Documentation/classarmnn_1_1_neon_softmax_uint8_workload.xhtml') diff --git a/Documentation/classarmnn_1_1_neon_softmax_uint8_workload.xhtml b/Documentation/classarmnn_1_1_neon_softmax_uint8_workload.xhtml new file mode 100644 index 0000000000..9fc2668761 --- /dev/null +++ b/Documentation/classarmnn_1_1_neon_softmax_uint8_workload.xhtml @@ -0,0 +1,247 @@ + + + + + + + + + + + + + +ArmNN: NeonSoftmaxUint8Workload Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
NeonSoftmaxUint8Workload Class Reference
+
+
+ +

#include <NeonSoftmaxUint8Workload.hpp>

+
+Inheritance diagram for NeonSoftmaxUint8Workload:
+
+
+ + +TypedWorkload< QueueDescriptor, DataTypes > +BaseWorkload< QueueDescriptor > +IWorkload + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 NeonSoftmaxUint8Workload (const SoftmaxQueueDescriptor &descriptor, const WorkloadInfo &info, std::shared_ptr< arm_compute::MemoryManagerOnDemand > &memoryManager)
 
virtual void Execute () const override
 
- Public Member Functions inherited from TypedWorkload< QueueDescriptor, DataTypes >
 TypedWorkload (const QueueDescriptor &descriptor, const WorkloadInfo &info)
 
- Public Member Functions inherited from BaseWorkload< QueueDescriptor >
 BaseWorkload (const QueueDescriptor &descriptor, const WorkloadInfo &info)
 
void PostAllocationConfigure () override
 
const QueueDescriptorGetData () 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< QueueDescriptor >
const QueueDescriptor m_Data
 
const profiling::ProfilingGuid m_Guid
 
+

Detailed Description

+
+

Definition at line 18 of file NeonSoftmaxUint8Workload.hpp.

+

Constructor & Destructor Documentation

+ +

◆ NeonSoftmaxUint8Workload()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NeonSoftmaxUint8Workload (const SoftmaxQueueDescriptordescriptor,
const WorkloadInfoinfo,
std::shared_ptr< arm_compute::MemoryManagerOnDemand > & memoryManager 
)
+
+ +

Definition at line 16 of file NeonSoftmaxUint8Workload.cpp.

+ +

References armnn::ComputeSoftmaxAclAxis(), SoftmaxDescriptor::m_Beta, BaseWorkload< QueueDescriptor >::m_Data, QueueDescriptor::m_Inputs, WorkloadInfo::m_InputTensorInfos, QueueDescriptor::m_Outputs, QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, and QueueDescriptor::ValidateInputsOutputs().

+
19  : Uint8Workload<SoftmaxQueueDescriptor>(descriptor, info)
20 {
21  m_Data.ValidateInputsOutputs("NeonSoftmaxUint8Workload", 1, 1);
22 
23  arm_compute::ITensor& input = boost::polymorphic_downcast<IAclTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
24  arm_compute::ITensor& output = boost::polymorphic_downcast<IAclTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
25 
26  const auto outputQuantization = output.info()->quantization_info();
27 
28  if ((!outputQuantization.scale().empty() && outputQuantization.scale()[0] != (1.0f / 256.0f)) ||
29  (!outputQuantization.offset().empty() && outputQuantization.offset()[0] != 0) ||
30  outputQuantization.scale().empty() || outputQuantization.offset().empty())
31  {
32  throw InvalidArgumentException(
33  "Invalid quantization for output. Only scale = 1.0f / 256.0f and offset = 0 supported");
34  }
35 
36  auto layer = std::make_unique<arm_compute::NESoftmaxLayer>(memoryManager);
37  unsigned int aclAxis = ComputeSoftmaxAclAxis(m_Data.m_Parameters, info.m_InputTensorInfos[0]);
38  layer->configure(&input, &output, descriptor.m_Parameters.m_Beta, aclAxis);
39  m_SoftmaxLayer.reset(layer.release());
40 }
const QueueDescriptor m_Data
Definition: Workload.hpp:46
+
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
+
unsigned int ComputeSoftmaxAclAxis(const SoftmaxDescriptor &softmaxDesc, const armnn::TensorInfo &tensor)
+
std::vector< ITensorHandle * > m_Outputs
+ +
std::vector< ITensorHandle * > m_Inputs
+
+
+
+

Member Function Documentation

+ +

◆ Execute()

+ +
+
+ + + + + +
+ + + + + + + +
void Execute () const
+
+overridevirtual
+
+ +

Implements IWorkload.

+ +

Definition at line 42 of file NeonSoftmaxUint8Workload.cpp.

+ +

References ARMNN_SCOPED_PROFILING_EVENT_NEON.

+
43 {
44  ARMNN_SCOPED_PROFILING_EVENT_NEON("NeonSoftmaxUint8Workload_Execute");
45 
46  m_SoftmaxLayer->run();
47 }
#define ARMNN_SCOPED_PROFILING_EVENT_NEON(name)
+
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1