blob: fb4803592f13d2020e86e266fa3b6eeac8c731c5 [file] [log] [blame]
Mike Kellyc9ea45a2020-02-28 18:11:58 +00001//
Teresa Charlin588cbdf2022-01-19 15:55:37 +00002// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
Mike Kellyc9ea45a2020-02-28 18:11:58 +00003// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
Teresa Charlin588cbdf2022-01-19 15:55:37 +00008#include "ClBaseWorkload.hpp"
Colm Donelan0c479742021-12-10 12:43:54 +00009#include <armnn/backends/WorkloadData.hpp>
Mike Kellyc9ea45a2020-02-28 18:11:58 +000010
11#include <armnn/TypesUtils.hpp>
12#include <arm_compute/runtime/CL/functions/CLPermute.h>
13
14#include <string>
15
16namespace armnn
17{
18
19arm_compute::Status ClTransposeWorkloadValidate(const TensorInfo& input,
20 const TensorInfo& output,
21 const TransposeDescriptor& descriptor);
22
Teresa Charlin588cbdf2022-01-19 15:55:37 +000023class ClTransposeWorkload : public ClBaseWorkload<TransposeQueueDescriptor>
Mike Kellyc9ea45a2020-02-28 18:11:58 +000024{
25public:
26 static const std::string& GetName()
27 {
28 static const std::string name = std::string("ClTransposeWorkload");
29 return name;
30 }
31
Sadik Armagane9444752020-12-02 11:28:58 +000032 ClTransposeWorkload(const TransposeQueueDescriptor& descriptor,
33 const WorkloadInfo& info,
34 const arm_compute::CLCompileContext& clCompileContext);
Mike Kellyc9ea45a2020-02-28 18:11:58 +000035 void Execute() const override;
36
37private:
38 using BaseWorkload<TransposeQueueDescriptor>::m_Data;
39 mutable arm_compute::CLPermute m_PermuteFunction;
40};
41
42} // namespace armnn