From 4d1ff588288b1a7a98dd2fd7f2ba5717b8ecf102 Mon Sep 17 00:00:00 2001 From: James Conroy Date: Mon, 10 Jun 2019 17:06:39 +0100 Subject: IVGCVSW-3221 Refactor Mean ref workload and tests * Renamed RefMeanFloat32Workload and RefMeanUint8Workload to RefMeanWorkload, updated references to reflect this change. * Refactored RefFloorWorkload to use Decoders/Encoders, to support the use of multiple data types. * Deleted reference Unit8 Mean tests as they were duplicates of the Float32 tests. Refactored these tests to support multiple data types and updated references. * Adjusted the values used in the tests' input tensors so that they are more like floating point numbers e.g. change 1.0f to 1.5f. * Replace size_t with unsigned int in Mean ref workload, for better compatibility with the Encoder/Decoder, removed some unnecessary casts after this. * Added ValidateTensorDataTypesMatch() function to WorkloadData.cpp, added CreateIncorrectDimensionsErrorMsg function to RefLayerSupport.cpp. * Added passing and failing tests for ref IsMeanSupported. Signed-off-by: James Conroy Change-Id: Id3d44463d1385255c727a497d4026d21a49e7eb2 --- src/backends/cl/test/ClLayerTests.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'src/backends/cl/test') diff --git a/src/backends/cl/test/ClLayerTests.cpp b/src/backends/cl/test/ClLayerTests.cpp index fee980c8a0..164a42a2b6 100644 --- a/src/backends/cl/test/ClLayerTests.cpp +++ b/src/backends/cl/test/ClLayerTests.cpp @@ -357,19 +357,21 @@ ARMNN_AUTO_TEST_CASE(MaximumBroadcast1ElementUint8, MaximumBroadcast1ElementUint ARMNN_AUTO_TEST_CASE(MaximumBroadcast1DVectorUint8, MaximumBroadcast1DVectorUint8Test) // Mean -ARMNN_AUTO_TEST_CASE(MeanUint8Simple, MeanUint8SimpleTest) -ARMNN_AUTO_TEST_CASE(MeanUint8SimpleAxis, MeanUint8SimpleAxisTest) -ARMNN_AUTO_TEST_CASE(MeanUint8KeepDims, MeanUint8KeepDimsTest) -ARMNN_AUTO_TEST_CASE(MeanUint8MultipleDims, MeanUint8MultipleDimsTest) -ARMNN_AUTO_TEST_CASE(MeanVtsUint8, MeanVtsUint8Test) - -ARMNN_AUTO_TEST_CASE(MeanFloatSimple, MeanFloatSimpleTest) -ARMNN_AUTO_TEST_CASE(MeanFloatSimpleAxis, MeanFloatSimpleAxisTest) -ARMNN_AUTO_TEST_CASE(MeanFloatKeepDims, MeanFloatKeepDimsTest) -ARMNN_AUTO_TEST_CASE(MeanFloatMultipleDims, MeanFloatMultipleDimsTest) -ARMNN_AUTO_TEST_CASE(MeanVtsFloat1, MeanVtsFloat1Test) -ARMNN_AUTO_TEST_CASE(MeanVtsFloat2, MeanVtsFloat2Test) -ARMNN_AUTO_TEST_CASE(MeanVtsFloat3, MeanVtsFloat3Test) +ARMNN_AUTO_TEST_CASE(MeanSimpleFloat32, MeanSimpleTest) +ARMNN_AUTO_TEST_CASE(MeanSimpleAxisFloat32, MeanSimpleAxisTest) +ARMNN_AUTO_TEST_CASE(MeanKeepDimsFloat32, MeanKeepDimsTest) +ARMNN_AUTO_TEST_CASE(MeanMultipleDimsFloat32, MeanMultipleDimsTest) +ARMNN_AUTO_TEST_CASE(MeanVts1Float32, MeanVts1Test) +ARMNN_AUTO_TEST_CASE(MeanVts2Float32, MeanVts2Test) +ARMNN_AUTO_TEST_CASE(MeanVts3Float32, MeanVts3Test) + +ARMNN_AUTO_TEST_CASE(MeanSimpleQuantisedAsymm8, MeanSimpleTest) +ARMNN_AUTO_TEST_CASE(MeanSimpleAxisQuantisedAsymm8, MeanSimpleAxisTest) +ARMNN_AUTO_TEST_CASE(MeanKeepDimsQuantisedAsymm8, MeanKeepDimsTest) +ARMNN_AUTO_TEST_CASE(MeanMultipleDimsQuantisedAsymm8, MeanMultipleDimsTest) +ARMNN_AUTO_TEST_CASE(MeanVts1QuantisedAsymm8, MeanVts1Test) +ARMNN_AUTO_TEST_CASE(MeanVts2QuantisedAsymm8, MeanVts2Test) +ARMNN_AUTO_TEST_CASE(MeanVts3QuantisedAsymm8, MeanVts3Test) // Minimum ARMNN_AUTO_TEST_CASE(MinimumBroadcast1Element1, MinimumBroadcast1ElementTest1) -- cgit v1.2.1