blob: 2df2b26a117b3a7d2a105f645c1356851e5f5095 [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
Aron Virginas-Tarc9cc8042018-11-01 16:15:57 +00008#include <backendsCommon/Workload.hpp>
9#include <backendsCommon/WorkloadData.hpp>
telsoa014fcda012018-03-09 14:13:49 +000010
11#include <armnn/TypesUtils.hpp>
12#include <arm_compute/runtime/CL/functions/CLPermute.h>
13
14#include <string>
15
16namespace armnn
17{
18
Matthew Bentham9820d302019-11-27 17:24:47 +000019arm_compute::Status ClPermuteWorkloadValidate(const TensorInfo& input,
20 const TensorInfo& output,
21 const PermuteDescriptor& descriptor);
telsoa014fcda012018-03-09 14:13:49 +000022
Nattapat Chaimanowong157d94f2018-10-10 15:47:15 +010023class ClPermuteWorkload : public BaseWorkload<PermuteQueueDescriptor>
telsoa014fcda012018-03-09 14:13:49 +000024{
25public:
26 static const std::string& GetName()
27 {
telsoa01c577f2c2018-08-31 09:22:23 +010028 static const std::string name = std::string("ClPermuteWorkload");
telsoa014fcda012018-03-09 14:13:49 +000029 return name;
30 }
31
Sadik Armagane9444752020-12-02 11:28:58 +000032 ClPermuteWorkload(const PermuteQueueDescriptor& descriptor,
33 const WorkloadInfo& info,
34 const arm_compute::CLCompileContext& clCompileContext);
telsoa014fcda012018-03-09 14:13:49 +000035 void Execute() const override;
36
37private:
Nattapat Chaimanowong157d94f2018-10-10 15:47:15 +010038 using BaseWorkload<PermuteQueueDescriptor>::m_Data;
telsoa014fcda012018-03-09 14:13:49 +000039 mutable arm_compute::CLPermute m_PermuteFunction;
40};
41
telsoa01c577f2c2018-08-31 09:22:23 +010042} // namespace armnn