ArmNN
 20.08
ClFullyConnectedWorkload.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
9 
10 #include <arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h>
11 #include <arm_compute/runtime/MemoryManagerOnDemand.h>
12 
13 #include <memory>
14 
15 namespace armnn
16 {
17 
19  const TensorInfo& output,
20  const TensorInfo& weights,
21  const TensorInfo& biases,
22  const FullyConnectedDescriptor& descriptor);
23 
24 class ClFullyConnectedWorkload : public armnn::BaseWorkload<armnn::FullyConnectedQueueDescriptor>
25 {
26 public:
29  std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager);
30 
32  void Execute() const override;
33 
34 private:
35  mutable arm_compute::CLFullyConnectedLayer m_FullyConnectedLayer;
36 
37  std::unique_ptr<arm_compute::CLTensor> m_WeightsTensor;
38  std::unique_ptr<arm_compute::CLTensor> m_BiasesTensor;
39 
40  void FreeUnusedTensors();
41 };
42 
43 } //namespace armnn
arm_compute::Status ClFullyConnectedWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor)
Copyright (c) 2020 ARM Limited.
Status
enumeration
Definition: Types.hpp:26
ClFullyConnectedWorkload(const armnn::FullyConnectedQueueDescriptor &descriptor, const armnn::WorkloadInfo &info, std::shared_ptr< arm_compute::MemoryManagerOnDemand > &memoryManager)
Contains information about inputs and outputs to a layer.