diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2020-04-30 11:39:37 +0100 |
---|---|---|
committer | Kevin May <kevin.may@arm.com> | 2020-04-30 10:46:12 +0000 |
commit | be88a57579a9a848efe13e6c524b5b104b871733 (patch) | |
tree | d5dc03627048f8ecd2d728b154434244f05475ea /src/backends/reference/test/RefCreateWorkloadTests.cpp | |
parent | 9937f9359ac4eeefc3535b66eddddd1b4f067c54 (diff) | |
download | armnn-be88a57579a9a848efe13e6c524b5b104b871733.tar.gz |
IVGCVSW-4753 Fix CpuAcc Hal 1.3 Softmax Failures
* Refactor Neon Softmax workload to accept supported data types
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I54aa72d5cbb862cafcc1eabe48f6a00d61050cd7
Diffstat (limited to 'src/backends/reference/test/RefCreateWorkloadTests.cpp')
-rw-r--r-- | src/backends/reference/test/RefCreateWorkloadTests.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
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<SoftmaxWorkloadType, DataType>(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) |