diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2020-05-11 16:10:38 +0100 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2020-05-13 18:34:12 +0000 |
commit | c1f6b09cc22b6e2de3d9eb88aec1778d0308a2b3 (patch) | |
tree | 14a70415b6d17b42246798a293dfdd13cbe4c123 /src/backends/cl/workloads/ClSoftmaxWorkload.hpp | |
parent | 0c32ccfcd0b770cdd4eeb9d778b7f72a233e229a (diff) | |
download | armnn-c1f6b09cc22b6e2de3d9eb88aec1778d0308a2b3.tar.gz |
IVGCVSW-4753 Refactor CL Softmax workload generalizing for different datatype
* Change ComputeSoftmaxAclAxis to work with int and uint axis
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: Ibbfa9ec7e2f0416e6885673212a767419c871cca
Diffstat (limited to 'src/backends/cl/workloads/ClSoftmaxWorkload.hpp')
-rw-r--r-- | src/backends/cl/workloads/ClSoftmaxWorkload.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/backends/cl/workloads/ClSoftmaxWorkload.hpp b/src/backends/cl/workloads/ClSoftmaxWorkload.hpp new file mode 100644 index 0000000000..158bf46c32 --- /dev/null +++ b/src/backends/cl/workloads/ClSoftmaxWorkload.hpp @@ -0,0 +1,34 @@ +// +// Copyright © 2020 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include <armnn/Descriptors.hpp> + +#include <arm_compute/core/Error.h> +#include <arm_compute/runtime/MemoryManagerOnDemand.h> +#include <arm_compute/runtime/CL/functions/CLSoftmaxLayer.h> + +#include <backendsCommon/Workload.hpp> + +namespace armnn +{ + +arm_compute::Status ClSoftmaxWorkloadValidate(const TensorInfo& input, + const TensorInfo& output, + const SoftmaxDescriptor& descriptor); + +class ClSoftmaxWorkload : public BaseWorkload<SoftmaxQueueDescriptor> +{ +public: + ClSoftmaxWorkload(const SoftmaxQueueDescriptor& descriptor, const WorkloadInfo& info, + std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager); + void Execute() const override; + +private: + mutable arm_compute::CLSoftmaxLayer m_SoftmaxLayer; +}; + +} // namespace armnn |