blob: 1f9710e1eac5c25438dfc2152c1337ba2fc83de4 [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa014fcda012018-03-09 14:13:49 +00004//
5
6#pragma once
7
David Beckac42efd2018-09-26 17:41:13 +01008#include <backends/Workload.hpp>
telsoa014fcda012018-03-09 14:13:49 +00009
Matthew Bentham14e46692018-09-20 15:35:30 +010010#include <arm_compute/runtime/CL/CLFunctions.h>
11#include <arm_compute/runtime/MemoryManagerOnDemand.h>
surmeh013537c2c2018-05-18 16:31:43 +010012
13#include <memory>
14
telsoa014fcda012018-03-09 14:13:49 +000015namespace armnn
16{
surmeh013537c2c2018-05-18 16:31:43 +010017
arovir019e53a352018-08-31 15:26:35 +010018class ClConvolution2dFloatWorkload : public FloatWorkload<Convolution2dQueueDescriptor>
telsoa014fcda012018-03-09 14:13:49 +000019{
20public:
arovir019e53a352018-08-31 15:26:35 +010021 ClConvolution2dFloatWorkload(const Convolution2dQueueDescriptor& descriptor, const WorkloadInfo& info,
22 std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager);
telsoa014fcda012018-03-09 14:13:49 +000023 void Execute() const override;
24
25private:
telsoa01c577f2c2018-08-31 09:22:23 +010026 mutable arm_compute::CLConvolutionLayer m_ConvolutionLayer;
telsoa014fcda012018-03-09 14:13:49 +000027
telsoa01c577f2c2018-08-31 09:22:23 +010028 std::unique_ptr<arm_compute::CLTensor> m_KernelTensor;
29 std::unique_ptr<arm_compute::CLTensor> m_BiasTensor;
30
31 void FreeUnusedTensors();
telsoa014fcda012018-03-09 14:13:49 +000032};
33
34} //namespace armnn
35