From 5a536641d9cb7c95b4422983b0f76627cabf6bda Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Mon, 19 Jun 2017 14:47:05 +0100 Subject: COMPMID-424 Add tests for Gaussian3x3 * Add reference implementation and NEON CL validation tests for gaussian3x3 * Add tests for different border modes * Incoporate PaddingCalculator Change-Id: Ia3cd5cb2cd0b4d870a217e6aedecc01369dc2541 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78125 Reviewed-by: Moritz Pflanzer Tested-by: Kaizen --- tests/validation/Reference.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/validation/Reference.cpp') diff --git a/tests/validation/Reference.cpp b/tests/validation/Reference.cpp index cab9d51302..98da34c27d 100644 --- a/tests/validation/Reference.cpp +++ b/tests/validation/Reference.cpp @@ -295,6 +295,21 @@ RawTensor Reference::compute_reference_depth_convert(const TensorShape &shape, D return ref_dst; } +RawTensor Reference::compute_reference_gaussian3x3(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::gaussian3x3(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) { -- cgit v1.2.1