From 1fd2c80692ed8ecefc4d8deb783564ad19eaf70c Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 16 Jun 2020 17:44:46 +0100 Subject: COMPMID-3375: Port NEActivationLayer functions/kernels to run on different tensors. Signed-off-by: Georgios Pinitas Change-Id: I98782bb73e9dc0899ffb1796aca6f99714adea94 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3343 Reviewed-by: Michalis Spyrou Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/core/NEON/kernels/NEReshapeLayerKernel.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/core/NEON/kernels/NEReshapeLayerKernel.cpp') diff --git a/src/core/NEON/kernels/NEReshapeLayerKernel.cpp b/src/core/NEON/kernels/NEReshapeLayerKernel.cpp index 600f8f9bf1..c141eecf75 100644 --- a/src/core/NEON/kernels/NEReshapeLayerKernel.cpp +++ b/src/core/NEON/kernels/NEReshapeLayerKernel.cpp @@ -86,29 +86,32 @@ void NEReshapeLayerKernel::configure(const ITensorInfo *input, ITensorInfo *outp INEKernel::configure(win); } -void NEReshapeLayerKernel::run_op(const std::vector &inputs, std::vector &outputs, const Window &window, const ThreadInfo &info) +void NEReshapeLayerKernel::run_op(const std::vector &inputs, const std::vector &outputs, const Window &window, const ThreadInfo &info) { ARM_COMPUTE_UNUSED(info); ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this); ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(INEKernel::window(), window); - switch(inputs[0]->second->info()->data_type()) + const auto src = inputs[0].tensor; + auto dst = outputs[0].tensor; + + switch(src->info()->data_type()) { case DataType::U8: case DataType::S8: case DataType::QASYMM8: case DataType::QASYMM8_SIGNED: - reshape_tensor(window, inputs[0]->second, outputs[0]->second); + reshape_tensor(window, src, dst); break; case DataType::U16: case DataType::S16: case DataType::F16: - reshape_tensor(window, inputs[0]->second, outputs[0]->second); + reshape_tensor(window, src, dst); break; case DataType::U32: case DataType::S32: case DataType::F32: - reshape_tensor(window, inputs[0]->second, outputs[0]->second); + reshape_tensor(window, src, dst); break; default: ARM_COMPUTE_ERROR("Unsupported data type!"); -- cgit v1.2.1