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" |
Colm Donelan | 0c47974 | 2021-12-10 12:43:54 +0000 | [diff] [blame] | 9 | #include <armnn/backends/WorkloadData.hpp> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 10 | |
| 11 | #include <armnn/TypesUtils.hpp> |
| 12 | #include <arm_compute/runtime/CL/functions/CLPermute.h> |
| 13 | |
| 14 | #include <string> |
| 15 | |
| 16 | namespace armnn |
| 17 | { |
| 18 | |
Matthew Bentham | 9820d30 | 2019-11-27 17:24:47 +0000 | [diff] [blame] | 19 | arm_compute::Status ClPermuteWorkloadValidate(const TensorInfo& input, |
| 20 | const TensorInfo& output, |
| 21 | const PermuteDescriptor& descriptor); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 22 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 23 | class ClPermuteWorkload : public ClBaseWorkload<PermuteQueueDescriptor> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 24 | { |
| 25 | public: |
| 26 | static const std::string& GetName() |
| 27 | { |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 28 | static const std::string name = std::string("ClPermuteWorkload"); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 29 | return name; |
| 30 | } |
| 31 | |
Sadik Armagan | e944475 | 2020-12-02 11:28:58 +0000 | [diff] [blame] | 32 | ClPermuteWorkload(const PermuteQueueDescriptor& descriptor, |
| 33 | const WorkloadInfo& info, |
| 34 | const arm_compute::CLCompileContext& clCompileContext); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 35 | void Execute() const override; |
| 36 | |
| 37 | private: |
Nattapat Chaimanowong | 157d94f | 2018-10-10 15:47:15 +0100 | [diff] [blame] | 38 | using BaseWorkload<PermuteQueueDescriptor>::m_Data; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 39 | mutable arm_compute::CLPermute m_PermuteFunction; |
| 40 | }; |
| 41 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 42 | } // namespace armnn |