From be88a57579a9a848efe13e6c524b5b104b871733 Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Thu, 30 Apr 2020 11:39:37 +0100 Subject: IVGCVSW-4753 Fix CpuAcc Hal 1.3 Softmax Failures * Refactor Neon Softmax workload to accept supported data types Signed-off-by: Sadik Armagan Change-Id: I54aa72d5cbb862cafcc1eabe48f6a00d61050cd7 --- src/backends/reference/test/RefCreateWorkloadTests.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/backends/reference/test') diff --git a/src/backends/reference/test/RefCreateWorkloadTests.cpp b/src/backends/reference/test/RefCreateWorkloadTests.cpp index 29bfbc0ee2..4a57df7d6a 100644 --- a/src/backends/reference/test/RefCreateWorkloadTests.cpp +++ b/src/backends/reference/test/RefCreateWorkloadTests.cpp @@ -504,10 +504,22 @@ static void RefCreateSoftmaxWorkloadTest() auto workload = CreateSoftmaxWorkloadTest(factory, graph); // Checks that outputs and inputs are as we expect them (see definition of CreateSoftmaxWorkloadTest). + + armnn::TensorInfo tensorInfo({4, 1}, DataType); + if (DataType == armnn::DataType::QAsymmU8) + { + tensorInfo.SetQuantizationOffset(0); + tensorInfo.SetQuantizationScale(1.f / 256); + } + else if (DataType == armnn::DataType::QAsymmS8) + { + tensorInfo.SetQuantizationOffset(-128); + tensorInfo.SetQuantizationScale(1.f / 256); + } CheckInputOutput( std::move(workload), - TensorInfo({4, 1}, DataType), - TensorInfo({4, 1}, DataType)); + tensorInfo, + tensorInfo); } BOOST_AUTO_TEST_CASE(CreateSoftmaxFloat32Workload) -- cgit v1.2.1