diff options
author | Matthew Bentham <matthew.bentham@arm.com> | 2018-10-01 11:32:48 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2018-10-10 16:16:57 +0100 |
commit | e2ec330b015fc34331f0023283b964ef97e1c5bb (patch) | |
tree | 76ce917f5d243ceb473dcdc2263e09781954b635 /src/backends/cl/workloads/ClMultiplicationFloatWorkload.cpp | |
parent | b30c53342756699dfaa6effd0a94aa9e69c2063a (diff) | |
download | armnn-e2ec330b015fc34331f0023283b964ef97e1c5bb.tar.gz |
IVGCVSW-1207 - Remove typing from ClMultiplicationWorkload
Don't need this now as it uses the compute library validation function,
and all of the code for the supported types is identical.
Adds Uint8 support to Cl backend, and unit test cases.
Change-Id: I35d4edacc1aca241e95d1b19ae525a23d9513c99
Diffstat (limited to 'src/backends/cl/workloads/ClMultiplicationFloatWorkload.cpp')
-rw-r--r-- | src/backends/cl/workloads/ClMultiplicationFloatWorkload.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/backends/cl/workloads/ClMultiplicationFloatWorkload.cpp b/src/backends/cl/workloads/ClMultiplicationFloatWorkload.cpp deleted file mode 100644 index d53e149129..0000000000 --- a/src/backends/cl/workloads/ClMultiplicationFloatWorkload.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright © 2017 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#include "ClMultiplicationFloatWorkload.hpp" -#include <backends/cl/ClTensorHandle.hpp> -#include <backends/CpuTensorHandle.hpp> -#include "ClWorkloadUtils.hpp" - -namespace armnn -{ - -arm_compute::Status ClMultiplicationWorkloadValidate(const TensorInfo& input0, - const TensorInfo& input1, - const TensorInfo& output) -{ - const arm_compute::TensorInfo aclInput1 = armcomputetensorutils::BuildArmComputeTensorInfo(input0); - const arm_compute::TensorInfo aclInput2 = armcomputetensorutils::BuildArmComputeTensorInfo(input1); - const arm_compute::TensorInfo aclOutput = armcomputetensorutils::BuildArmComputeTensorInfo(output); - - // At the time of writing, configure() will fail if a rounding policy other than TO_ZERO is supplied to it, - // when providing a scale of 1.0 for F32 tensors, even though the provided rounding policy appears to be - // ignored for F32 tensors. - return arm_compute::CLPixelWiseMultiplication::validate(&aclInput1, - &aclInput2, - &aclOutput, - 1.0f, - arm_compute::ConvertPolicy::SATURATE, - arm_compute::RoundingPolicy::TO_ZERO); -} - - -ClMultiplicationFloatWorkload::ClMultiplicationFloatWorkload(const MultiplicationQueueDescriptor& descriptor, - const WorkloadInfo& info) - : FloatWorkload<MultiplicationQueueDescriptor>(descriptor, info) -{ - m_Data.ValidateInputsOutputs("ClMultiplicationFloatWorkload", 2, 1); - - arm_compute::ICLTensor& input0 = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor(); - arm_compute::ICLTensor& input1 = static_cast<IClTensorHandle*>(m_Data.m_Inputs[1])->GetTensor(); - arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor(); - // Construct - m_PixelWiseMultiplication.configure(&input0, - &input1, - &output, - 1.0f, - arm_compute::ConvertPolicy::SATURATE, - arm_compute::RoundingPolicy::TO_NEAREST_EVEN); -} - -void ClMultiplicationFloatWorkload::Execute() const -{ - ARMNN_SCOPED_PROFILING_EVENT_CL("ClMultiplicationFloatWorkload_Execute"); - - // Executes the layer. - m_PixelWiseMultiplication.run(); -} - -} //namespace armnn |