Teresa Charlin | c1f6b09 | 2020-05-11 16:10:38 +0100 | [diff] [blame] | 1 | // |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 2 | // Copyright © 2020 Arm Ltd and Contributors. All rights reserved. |
Teresa Charlin | c1f6b09 | 2020-05-11 16:10:38 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include <armnn/Descriptors.hpp> |
| 9 | |
| 10 | #include <arm_compute/core/Error.h> |
| 11 | #include <arm_compute/runtime/MemoryManagerOnDemand.h> |
| 12 | #include <arm_compute/runtime/CL/functions/CLSoftmaxLayer.h> |
| 13 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 14 | #include "ClBaseWorkload.hpp" |
Teresa Charlin | c1f6b09 | 2020-05-11 16:10:38 +0100 | [diff] [blame] | 15 | |
| 16 | namespace armnn |
| 17 | { |
| 18 | |
| 19 | arm_compute::Status ClSoftmaxWorkloadValidate(const TensorInfo& input, |
| 20 | const TensorInfo& output, |
| 21 | const SoftmaxDescriptor& descriptor); |
| 22 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 23 | class ClSoftmaxWorkload : public ClBaseWorkload<SoftmaxQueueDescriptor> |
Teresa Charlin | c1f6b09 | 2020-05-11 16:10:38 +0100 | [diff] [blame] | 24 | { |
| 25 | public: |
Sadik Armagan | e944475 | 2020-12-02 11:28:58 +0000 | [diff] [blame] | 26 | ClSoftmaxWorkload(const SoftmaxQueueDescriptor& descriptor, |
| 27 | const WorkloadInfo& info, |
| 28 | std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager, |
| 29 | const arm_compute::CLCompileContext& clCompileContext); |
Teresa Charlin | c1f6b09 | 2020-05-11 16:10:38 +0100 | [diff] [blame] | 30 | void Execute() const override; |
| 31 | |
| 32 | private: |
| 33 | mutable arm_compute::CLSoftmaxLayer m_SoftmaxLayer; |
| 34 | }; |
| 35 | |
| 36 | } // namespace armnn |