diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-06-16 17:44:46 +0100 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2020-06-17 09:29:40 +0000 |
commit | 1fd2c80692ed8ecefc4d8deb783564ad19eaf70c (patch) | |
tree | b44219bdc8bdc17cb2906dd50a5ba1ee1e6b12fc /src/core/NEON/kernels/NEReshapeLayerKernel.cpp | |
parent | 27a9e4f10516679bc6e92bec104ae219e1fa7f15 (diff) | |
download | ComputeLibrary-1fd2c80692ed8ecefc4d8deb783564ad19eaf70c.tar.gz |
COMPMID-3375: Port NEActivationLayer functions/kernels to run on
different tensors.
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: I98782bb73e9dc0899ffb1796aca6f99714adea94
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3343
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEReshapeLayerKernel.cpp')
-rw-r--r-- | src/core/NEON/kernels/NEReshapeLayerKernel.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
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<InputOperatorTensors *> &inputs, std::vector<OutputOperatorTensors *> &outputs, const Window &window, const ThreadInfo &info) +void NEReshapeLayerKernel::run_op(const std::vector<InputTensor> &inputs, const std::vector<OutputTensor> &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<uint8_t>(window, inputs[0]->second, outputs[0]->second); + reshape_tensor<uint8_t>(window, src, dst); break; case DataType::U16: case DataType::S16: case DataType::F16: - reshape_tensor<uint16_t>(window, inputs[0]->second, outputs[0]->second); + reshape_tensor<uint16_t>(window, src, dst); break; case DataType::U32: case DataType::S32: case DataType::F32: - reshape_tensor<uint32_t>(window, inputs[0]->second, outputs[0]->second); + reshape_tensor<uint32_t>(window, src, dst); break; default: ARM_COMPUTE_ERROR("Unsupported data type!"); |