IVGCVSW-2354 Remove dimension validation from softmax
authorMohamed Nour Abouelseoud <mohamednour.abouelseoud@arm.com>
Mon, 10 Dec 2018 14:19:41 +0000 (14:19 +0000)
committerMohamed Nour Abouelseoud <mohamednour.abouelseoud@arm.com>
Mon, 10 Dec 2018 15:24:04 +0000 (15:24 +0000)
Change-Id: I0d69a72df9e348cbeca690926485c050499d1051

src/backends/cl/test/ClLayerTests.cpp
src/backends/cl/workloads/ClSoftmaxBaseWorkload.cpp
src/backends/neon/test/NeonLayerTests.cpp
src/backends/neon/workloads/NeonSoftmaxBaseWorkload.cpp

index 862648e..10c177c 100755 (executable)
@@ -121,21 +121,6 @@ ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dAsymmetricNhwc,
 ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dAsymmetricNhwc,
                      DepthwiseConvolution2dAsymmetricTest, false, armnn::DataLayout::NHWC)
 
-// Softmax
-BOOST_AUTO_TEST_CASE(Softmax4dSupport)
-{
-    const unsigned int numDimensions = 4u;
-    std::array<unsigned int, numDimensions> dimensionSizes;
-    dimensionSizes.fill(1u);
-
-    const armnn::TensorInfo inputInfo(numDimensions, &dimensionSizes.front(), armnn::DataType::Float32);
-    const armnn::TensorInfo outputInfo(numDimensions, &dimensionSizes.front(), armnn::DataType::Float32);
-
-    // 4D Softmax should be reported as unsupported on the CL backend
-    armnn::ClLayerSupport layerSupport;
-    BOOST_TEST(!layerSupport.IsSoftmaxSupported(inputInfo, outputInfo, armnn::SoftmaxDescriptor()));
-}
-
 // Splitter
 ARMNN_AUTO_TEST_CASE(SimpleSplitter, SplitterTest)
 ARMNN_AUTO_TEST_CASE(SimpleSplitterUint8, SplitterUint8Test)
index 48dd398..b1dc404 100644 (file)
@@ -15,12 +15,6 @@ namespace armnn
 arm_compute::Status ClSoftmaxWorkloadValidate(const TensorInfo& input,
                                               const TensorInfo& output)
 {
-    // NOTE: We report 4D Softmax as unsupported until full support is added to ACL
-    if(input.GetShape().GetNumDimensions() >= 4u)
-    {
-        return arm_compute::Status(arm_compute::ErrorCode::RUNTIME_ERROR, "4d softmax is not supported");
-    }
-
     const arm_compute::TensorInfo aclInputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(input);
     const arm_compute::TensorInfo aclOutputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(output);
 
index 0382c1c..72ae372 100644 (file)
@@ -282,21 +282,6 @@ ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta2Uint8, SimpleSoftmaxUint8Test, 2.0f)
 ARMNN_AUTO_TEST_CASE(ReLu1Uint8, BoundedReLuUint8UpperAndLowerBoundTest)
 ARMNN_AUTO_TEST_CASE(ReLu6Uint8, BoundedReLuUint8UpperBoundOnlyTest)
 
-// Softmax
-BOOST_AUTO_TEST_CASE(Softmax4dSupport)
-{
-    const unsigned int numDimensions = 4u;
-    std::array<unsigned int, numDimensions> dimensionSizes;
-    dimensionSizes.fill(1u);
-
-    const armnn::TensorInfo inputInfo(numDimensions, &dimensionSizes.front(), armnn::DataType::Float32);
-    const armnn::TensorInfo outputInfo(numDimensions, &dimensionSizes.front(), armnn::DataType::Float32);
-
-    // 4D Softmax should be reported as unsupported on the NEON backend
-    armnn::NeonLayerSupport layerSupport;
-    BOOST_TEST(!layerSupport.IsSoftmaxSupported(inputInfo, outputInfo, armnn::SoftmaxDescriptor()));
-}
-
 // Splitter
 ARMNN_AUTO_TEST_CASE(SimpleSplitter, SplitterTest)
 ARMNN_AUTO_TEST_CASE(SimpleSplitterUint8, SplitterUint8Test)
index b97cf84..434de87 100644 (file)
@@ -14,12 +14,6 @@ arm_compute::Status NeonSoftmaxWorkloadValidate(const TensorInfo& input,
                                                 const TensorInfo& output,
                                                 const SoftmaxDescriptor& descriptor)
 {
-    // NOTE: We report 4D Softmax as unsupported until full support is added to ACL
-    if(input.GetShape().GetNumDimensions() >= 4u)
-    {
-        return arm_compute::Status(arm_compute::ErrorCode::RUNTIME_ERROR, "4d softmax is not supported");
-    }
-
     const arm_compute::TensorInfo aclInputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(input);
     const arm_compute::TensorInfo aclOutputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(output);