ArmNN
 21.02
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  const ActivationDescriptor* activationDescriptor = nullptr);
24 
25 class ClFullyConnectedWorkload : public armnn::BaseWorkload<armnn::FullyConnectedQueueDescriptor>
26 {
27 public:
30  std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager,
31  const arm_compute::CLCompileContext& clCompileContext);
32 
34  void Execute() const override;
35 
36 private:
37  mutable arm_compute::CLFullyConnectedLayer m_FullyConnectedLayer;
38 
39  std::unique_ptr<arm_compute::CLTensor> m_WeightsTensor;
40  std::unique_ptr<arm_compute::CLTensor> m_BiasesTensor;
41 
42  void FreeUnusedTensors();
43 };
44 
45 } //namespace armnn
arm_compute::Status ClFullyConnectedWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, const ActivationDescriptor *activationDescriptor)
Copyright (c) 2021 ARM Limited and Contributors.
ClFullyConnectedWorkload(const armnn::FullyConnectedQueueDescriptor &descriptor, const armnn::WorkloadInfo &info, std::shared_ptr< arm_compute::MemoryManagerOnDemand > &memoryManager, const arm_compute::CLCompileContext &clCompileContext)
Status
enumeration
Definition: Types.hpp:26
Contains information about inputs and outputs to a layer.