blob: 7c05bbf33d516ef63c9473c9975061c789d08b9b [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa014fcda012018-03-09 14:13:49 +00004//
5
arovir019e53a352018-08-31 15:26:35 +01006#include "ClResizeBilinearFloatWorkload.hpp"
David Beck711fa312018-09-24 10:46:38 +01007#include <backends/ClTensorHandle.hpp>
8#include <backends/CpuTensorHandle.hpp>
9#include <backends/ClLayerSupport.hpp>
10#include <backends/aclCommon/ArmComputeUtils.hpp>
telsoa014fcda012018-03-09 14:13:49 +000011
Matthew Bentham14e46692018-09-20 15:35:30 +010012#include "ClWorkloadUtils.hpp"
13
telsoa014fcda012018-03-09 14:13:49 +000014namespace armnn
15{
16
arovir019e53a352018-08-31 15:26:35 +010017ClResizeBilinearFloatWorkload::ClResizeBilinearFloatWorkload(const ResizeBilinearQueueDescriptor& descriptor,
telsoa014fcda012018-03-09 14:13:49 +000018 const WorkloadInfo& info)
telsoa01c577f2c2018-08-31 09:22:23 +010019 : FloatWorkload<ResizeBilinearQueueDescriptor>(descriptor, info)
telsoa014fcda012018-03-09 14:13:49 +000020{
arovir019e53a352018-08-31 15:26:35 +010021 m_Data.ValidateInputsOutputs("ClResizeBilinearFloatWorkload", 1, 1);
telsoa014fcda012018-03-09 14:13:49 +000022
23 arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
24 arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
25
26 m_ResizeBilinearLayer.configure(&input, &output, arm_compute::InterpolationPolicy::BILINEAR,
27 arm_compute::BorderMode::REPLICATE, arm_compute::PixelValue(0.f),
28 arm_compute::SamplingPolicy::TOP_LEFT);
29};
30
arovir019e53a352018-08-31 15:26:35 +010031void ClResizeBilinearFloatWorkload::Execute() const
telsoa014fcda012018-03-09 14:13:49 +000032{
arovir019e53a352018-08-31 15:26:35 +010033 ARMNN_SCOPED_PROFILING_EVENT_CL("ClResizeBilinearFloatWorkload_Execute");
telsoa014fcda012018-03-09 14:13:49 +000034 m_ResizeBilinearLayer.run();
35}
36
37
Matthew Bentham14e46692018-09-20 15:35:30 +010038} //namespace armnn