telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 1 | // |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 2 | // Copyright © 2017 Arm Ltd and Contributors. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 8 | #include "ClBaseWorkload.hpp" |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 9 | |
Matthew Bentham | 9b3e738 | 2020-02-05 21:39:55 +0000 | [diff] [blame] | 10 | #include <arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h> |
Matthew Bentham | 14e4669 | 2018-09-20 15:35:30 +0100 | [diff] [blame] | 11 | #include <arm_compute/runtime/MemoryManagerOnDemand.h> |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 12 | |
| 13 | #include <memory> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 14 | |
| 15 | namespace armnn |
| 16 | { |
| 17 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 18 | arm_compute::Status ClFullyConnectedWorkloadValidate(const TensorInfo& input, |
| 19 | const TensorInfo& output, |
| 20 | const TensorInfo& weights, |
Matthew Bentham | 67d6390 | 2022-02-08 15:03:07 +0000 | [diff] [blame] | 21 | const Optional<TensorInfo>& biases, |
Mike Kelly | 07810fc | 2020-11-12 10:58:48 +0000 | [diff] [blame] | 22 | const FullyConnectedDescriptor& descriptor, |
| 23 | const ActivationDescriptor* activationDescriptor = nullptr); |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 24 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 25 | class ClFullyConnectedWorkload : public ClBaseWorkload<FullyConnectedQueueDescriptor> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 26 | { |
| 27 | public: |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 28 | ClFullyConnectedWorkload(const FullyConnectedQueueDescriptor& descriptor, |
| 29 | const WorkloadInfo& info, |
Sadik Armagan | e944475 | 2020-12-02 11:28:58 +0000 | [diff] [blame] | 30 | std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager, |
| 31 | const arm_compute::CLCompileContext& clCompileContext); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 32 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 33 | using ClBaseWorkload<FullyConnectedQueueDescriptor>::m_Data; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 34 | void Execute() const override; |
| 35 | |
| 36 | private: |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 37 | mutable arm_compute::CLFullyConnectedLayer m_FullyConnectedLayer; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | } //namespace armnn |