aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/Reference.cpp
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2017-06-19 15:31:43 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:14:20 +0100
commit3eb263e95898c933cde5450a919a161ac6b2359b (patch)
treec5a2c9be95ffe2ee69079c0b1f69c1ce89d9e095 /tests/validation/Reference.cpp
parent0326eae38bfe3788338664f2d99924e24a19895f (diff)
downloadComputeLibrary-3eb263e95898c933cde5450a919a161ac6b2359b.tar.gz
COMPMID-424 Add validation tests for Gaussian5x5
* Fix apply_2d_spatial_filter to use double as intermediate type * Fix tensor_elem_at to use random value if on border and border_mode is UNDEFINED Change-Id: I7feea23c4664cc63c5bab936566dc92b98c723b9 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78905 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Diffstat (limited to 'tests/validation/Reference.cpp')
-rw-r--r--tests/validation/Reference.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/validation/Reference.cpp b/tests/validation/Reference.cpp
index 98da34c27d..f6f3cb8e1f 100644
--- a/tests/validation/Reference.cpp
+++ b/tests/validation/Reference.cpp
@@ -310,6 +310,21 @@ RawTensor Reference::compute_reference_gaussian3x3(const TensorShape &shape, Bor
return ref_dst;
}
+RawTensor Reference::compute_reference_gaussian5x5(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value)
+{
+ // Create reference
+ RawTensor ref_src = library->get(shape, DataType::U8);
+ RawTensor ref_dst = library->get(shape, DataType::U8);
+
+ // Fill reference
+ library->fill_tensor_uniform(ref_src, 0);
+
+ // Compute reference
+ ReferenceCPP::gaussian5x5(ref_src, ref_dst, border_mode, constant_border_value);
+
+ return ref_dst;
+}
+
RawTensor Reference::compute_reference_gemm(const TensorShape &src_shape1, const TensorShape &src_shape2, const TensorShape &src_shape3,
const TensorShape &dst_shape, float alpha, float beta, DataType dt, int fixed_point_position)
{