ArmNN
 24.02
NeonFullyConnectedWorkload.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include "NeonBaseWorkload.hpp"
9 
10 #include <arm_compute/core/Error.h>
11 #include <arm_compute/runtime/IFunction.h>
12 #include <arm_compute/runtime/MemoryManagerOnDemand.h>
13 #include <arm_compute/runtime/Tensor.h>
14 
15 #include <memory>
16 
17 namespace armnn
18 {
19 
21  const TensorInfo& output,
22  const TensorInfo& weights,
23  const Optional<TensorInfo>& biases,
24  const FullyConnectedDescriptor& descriptor,
25  const ActivationDescriptor* activationDescriptor = nullptr);
26 
27 class NeonFullyConnectedWorkload : public NeonBaseWorkload<FullyConnectedQueueDescriptor>
28 {
29 public:
31  std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager);
32 
33  virtual void Execute() const override;
34 
35 private:
36  std::unique_ptr<arm_compute::IFunction> m_FullyConnectedLayer;
37  mutable std::unique_ptr<arm_compute::Tensor> m_WeightsTensor;
38  mutable std::unique_ptr<arm_compute::Tensor> m_BiasesTensor;
39  TensorInfo m_WeightsTensorInfo;
40  TensorInfo m_BiasesTensorInfo;
41  mutable bool prepared = false;
42 };
43 
44 } //namespace armnn
45 
armnn::NeonFullyConnectedWorkloadValidate
arm_compute::Status NeonFullyConnectedWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const Optional< TensorInfo > &biases, const FullyConnectedDescriptor &descriptor, const ActivationDescriptor *activationDescriptor)
Definition: NeonFullyConnectedWorkload.cpp:24
armnn::FullyConnectedQueueDescriptor
Definition: WorkloadData.hpp:180
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::NeonFullyConnectedWorkload::Execute
virtual void Execute() const override
Definition: NeonFullyConnectedWorkload.cpp:112
NeonBaseWorkload.hpp
armnn::NeonFullyConnectedWorkload::NeonFullyConnectedWorkload
NeonFullyConnectedWorkload(const FullyConnectedQueueDescriptor &descriptor, const WorkloadInfo &info, std::shared_ptr< arm_compute::MemoryManagerOnDemand > &memoryManager)
Definition: NeonFullyConnectedWorkload.cpp:55
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition: WorkloadInfo.hpp:16
armnn::BoostLogSeverityMapping::info
@ info
armnn::Status
Status
Definition: Types.hpp:42
armnn::NeonFullyConnectedWorkload
Definition: NeonFullyConnectedWorkload.hpp:27
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::NeonBaseWorkload
Definition: NeonBaseWorkload.hpp:13