diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2017-08-29 16:05:25 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 06b184ac568dc974986bae680957c4477f8ef6ca (patch) | |
tree | fa97d020f81f9a17edb6b50394f2bdf46f810ce9 /src/runtime/NEON | |
parent | 351c20a361521101307d365a4f91ad883fa272ea (diff) | |
download | ComputeLibrary-06b184ac568dc974986bae680957c4477f8ef6ca.tar.gz |
COMPMID-439 - Refactored NEQuantizationLayer and NEQuantizationLayer in order to support 3D input tensors
Change-Id: I03eac2108a30bed56d40dfd52e75577a35d492e0
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/85783
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/runtime/NEON')
-rw-r--r-- | src/runtime/NEON/functions/NEDequantizationLayer.cpp | 10 | ||||
-rw-r--r-- | src/runtime/NEON/functions/NEQuantizationLayer.cpp | 11 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/runtime/NEON/functions/NEDequantizationLayer.cpp b/src/runtime/NEON/functions/NEDequantizationLayer.cpp index f1743674da..a58b6e4007 100644 --- a/src/runtime/NEON/functions/NEDequantizationLayer.cpp +++ b/src/runtime/NEON/functions/NEDequantizationLayer.cpp @@ -24,9 +24,7 @@ #include "arm_compute/runtime/NEON/functions/NEDequantizationLayer.h" -#include "arm_compute/core/Error.h" #include "arm_compute/core/Types.h" -#include "arm_compute/core/Validate.h" #include "arm_compute/runtime/NEON/NEScheduler.h" using namespace arm_compute; @@ -36,13 +34,13 @@ NEDequantizationLayer::NEDequantizationLayer() { } -void NEDequantizationLayer::configure(const ITensor *input, ITensor *output, const float *min, const float *max) +void NEDequantizationLayer::configure(const ITensor *input, ITensor *output, const ITensor *min_max) { - // Configure kernels - _dequantize_kernel.configure(input, output, min, max); + // Configure kernel + _dequantize_kernel.configure(input, output, min_max); } void NEDequantizationLayer::run() { NEScheduler::get().schedule(&_dequantize_kernel, Window::DimY); -} +}
\ No newline at end of file diff --git a/src/runtime/NEON/functions/NEQuantizationLayer.cpp b/src/runtime/NEON/functions/NEQuantizationLayer.cpp index 46b9d7d707..a131c4839b 100644 --- a/src/runtime/NEON/functions/NEQuantizationLayer.cpp +++ b/src/runtime/NEON/functions/NEQuantizationLayer.cpp @@ -30,17 +30,20 @@ using namespace arm_compute; NEQuantizationLayer::NEQuantizationLayer() - : _quantize_kernel(), _min_max_kernel(), _min(0.f), _max(0.f) + : _quantize_kernel(), _min_max_kernel(), _min_max() { } void NEQuantizationLayer::configure(const ITensor *input, ITensor *output) { - // Configure min-max kernel - _min_max_kernel.configure(input, &_min, &_max); + // Configure min-max kernel. _min_max tensor will be auto-configured within the kernel + _min_max_kernel.configure(input, &_min_max); // Configure quantize kernel - _quantize_kernel.configure(input, output, &_min, &_max); + _quantize_kernel.configure(input, output, &_min_max); + + // Allocate min_max tensor + _min_max.allocator()->allocate(); } void NEQuantizationLayer::run() |