diff options
author | Conor Kennedy <conor.kennedy@arm.com> | 2019-03-08 08:24:41 +0000 |
---|---|---|
committer | Kevin May <kevin.may@arm.com> | 2019-03-11 10:38:20 +0000 |
commit | b99480bc522fd98a8e587478b78906e8a57936df (patch) | |
tree | fc6b5ce8e28eda60fa791cec097f65572b641408 /src/backends/neon/workloads/NeonMultiplicationFloatWorkload.cpp | |
parent | a6d45c77688978518ca2113ff68ca7d98aaca36a (diff) | |
download | armnn-b99480bc522fd98a8e587478b78906e8a57936df.tar.gz |
IVGCVSW-2792 Update Neon Mul/Sub workload for latest CL master
* Update Neon Subtraction/Multiplication to use BaseWorkload
* Add Uint8 tests for Subtraction/Multiplication
Change-Id: Ied2aa048924817a4db0025b9bd9e54151667bd74
Signed-off-by: Conor Kennedy <conor.kennedy@arm.com>
Diffstat (limited to 'src/backends/neon/workloads/NeonMultiplicationFloatWorkload.cpp')
-rw-r--r-- | src/backends/neon/workloads/NeonMultiplicationFloatWorkload.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/backends/neon/workloads/NeonMultiplicationFloatWorkload.cpp b/src/backends/neon/workloads/NeonMultiplicationFloatWorkload.cpp deleted file mode 100644 index 778e78213c..0000000000 --- a/src/backends/neon/workloads/NeonMultiplicationFloatWorkload.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright © 2017 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#include "NeonMultiplicationFloatWorkload.hpp" - -#include "NeonWorkloadUtils.hpp" - -#include <arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h> - -namespace armnn -{ - -arm_compute::Status NeonMultiplicationWorkloadValidate(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::NEPixelWiseMultiplication::validate(&aclInput1, - &aclInput2, - &aclOutput, - 1.0f, - arm_compute::ConvertPolicy::SATURATE, - arm_compute::RoundingPolicy::TO_ZERO); -} - -NeonMultiplicationFloatWorkload::NeonMultiplicationFloatWorkload(const MultiplicationQueueDescriptor& descriptor, - const WorkloadInfo& info) - : FloatWorkload<MultiplicationQueueDescriptor>(descriptor, info) -{ - m_Data.ValidateInputsOutputs("NeonMultiplicationFloatWorkload", 2, 1); - - arm_compute::ITensor& input1 = boost::polymorphic_downcast<INeonTensorHandle*>(m_Data.m_Inputs[0])->GetTensor(); - arm_compute::ITensor& input2 = boost::polymorphic_downcast<INeonTensorHandle*>(m_Data.m_Inputs[1])->GetTensor(); - arm_compute::ITensor& output = boost::polymorphic_downcast<INeonTensorHandle*>(m_Data.m_Outputs[0])->GetTensor(); - - // 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. - auto layer = std::make_unique<arm_compute::NEPixelWiseMultiplication>(); - layer->configure(&input1, - &input2, - &output, - 1.0f, - arm_compute::ConvertPolicy::SATURATE, - arm_compute::RoundingPolicy::TO_ZERO); - m_PixelWiseMultiplication.reset(layer.release()); -} - -void NeonMultiplicationFloatWorkload::Execute() const -{ - ARMNN_SCOPED_PROFILING_EVENT_NEON("NeonMultiplicationFloatWorkload_Execute"); - m_PixelWiseMultiplication->run(); -} - -} //namespace armnn - - |