From d24affe0abefe8f4a83c7d4487386920895fd2e7 Mon Sep 17 00:00:00 2001 From: Sang-Hoon Park Date: Tue, 8 Oct 2019 18:07:23 +0100 Subject: COMPMID-2265 add support for Log Softmax to NEON Kernel (NEON/reference), validation tests, function and fixture are updated to add support for Log Softmax Change-Id: I641dbf1552f4128c691af8875949ebf88da71ee8 Signed-off-by: Sang-Hoon Park Reviewed-on: https://review.mlplatform.org/c/2075 Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio Tested-by: Arm Jenkins --- tests/validation/fixtures/SoftmaxLayerFixture.h | 42 +++++++++++++++---------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'tests/validation/fixtures') diff --git a/tests/validation/fixtures/SoftmaxLayerFixture.h b/tests/validation/fixtures/SoftmaxLayerFixture.h index e39ee74800..f747ab3574 100644 --- a/tests/validation/fixtures/SoftmaxLayerFixture.h +++ b/tests/validation/fixtures/SoftmaxLayerFixture.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -32,6 +32,7 @@ #include "tests/IAccessor.h" #include "tests/framework/Asserts.h" #include "tests/framework/Fixture.h" +#include "tests/validation/reference/LogSoftmaxLayer.h" #include "tests/validation/reference/SoftmaxLayer.h" #include @@ -42,7 +43,7 @@ namespace test { namespace validation { -template +template class SoftmaxValidationGenericFixture : public framework::Fixture { public: @@ -110,7 +111,14 @@ protected: // Fill reference fill(src); - return reference::softmax_layer(src, beta, axis); + if(IS_LOG) + { + return reference::log_softmax_layer(src, beta, axis); + } + else + { + return reference::softmax_layer(src, beta, axis); + } } TensorType _target{}; @@ -118,33 +126,33 @@ protected: QuantizationInfo _quantization_info{}; }; -template -class SoftmaxValidationFixture : public SoftmaxValidationGenericFixture +template +class SoftmaxValidationFixture : public SoftmaxValidationGenericFixture { public: template void setup(TensorShape shape, DataType data_type, float beta, size_t axis) { - SoftmaxValidationGenericFixture::setup(shape, - data_type, - QuantizationInfo(), - beta, - axis); + SoftmaxValidationGenericFixture::setup(shape, + data_type, + QuantizationInfo(), + beta, + axis); } }; -template -class SoftmaxValidationQuantizedFixture : public SoftmaxValidationGenericFixture +template +class SoftmaxValidationQuantizedFixture : public SoftmaxValidationGenericFixture { public: template void setup(TensorShape shape, DataType data_type, QuantizationInfo quantization_info, float beta, size_t axis) { - SoftmaxValidationGenericFixture::setup(shape, - data_type, - quantization_info, - beta, - axis); + SoftmaxValidationGenericFixture::setup(shape, + data_type, + quantization_info, + beta, + axis); } }; } // namespace validation -- cgit v1.2.1