diff options
Diffstat (limited to 'src')
5 files changed, 43 insertions, 3 deletions
diff --git a/src/backends/backendsCommon/WorkloadData.cpp b/src/backends/backendsCommon/WorkloadData.cpp index d3e58b632c..fe4705491a 100644 --- a/src/backends/backendsCommon/WorkloadData.cpp +++ b/src/backends/backendsCommon/WorkloadData.cpp @@ -2562,7 +2562,8 @@ void GatherQueueDescriptor::Validate(const WorkloadInfo& workloadInfo) const DataType::Float32, DataType::QAsymmS8, DataType::QAsymmU8, - DataType::QSymmS16 + DataType::QSymmS16, + DataType::Signed32, }; ValidateDataTypes(inputTensorInfo, supportedTypes, descriptorName); diff --git a/src/backends/backendsCommon/test/layerTests/GatherTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/GatherTestImpl.cpp index 47adb22fe7..bee5f6aaf9 100644 --- a/src/backends/backendsCommon/test/layerTests/GatherTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/GatherTestImpl.cpp @@ -324,6 +324,13 @@ LayerTestResult<int16_t, 1> Gather1dParamsInt16Test( return GatherTestHelper<armnn::DataType::QSymmS16>::Gather1dParamsTestImpl(workloadFactory, memoryManager); } +LayerTestResult<int32_t, 1> Gather1dParamsInt32Test( + armnn::IWorkloadFactory& workloadFactory, + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) +{ + return GatherTestHelper<armnn::DataType::Signed32>::Gather1dParamsTestImpl(workloadFactory, memoryManager); +} + LayerTestResult<float, 2> GatherMultiDimParamsFloat32Test( armnn::IWorkloadFactory& workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) @@ -354,6 +361,14 @@ LayerTestResult<int16_t, 2> GatherMultiDimParamsInt16Test( workloadFactory, memoryManager); } +LayerTestResult<int32_t, 2> GatherMultiDimParamsInt32Test( + armnn::IWorkloadFactory& workloadFactory, + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) +{ + return GatherTestHelper<armnn::DataType::Signed32>::GatherMultiDimParamsTestImpl( + workloadFactory, memoryManager); +} + LayerTestResult<float, 4> GatherMultiDimParamsMultiDimIndicesFloat32Test( armnn::IWorkloadFactory& workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) @@ -385,3 +400,11 @@ LayerTestResult<int16_t, 4> GatherMultiDimParamsMultiDimIndicesInt16Test( return GatherTestHelper<armnn::DataType::QSymmS16>::GatherMultiDimParamsMultiDimIndicesTestImpl( workloadFactory, memoryManager); } + +LayerTestResult<int32_t, 4> GatherMultiDimParamsMultiDimIndicesInt32Test( + armnn::IWorkloadFactory& workloadFactory, + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) +{ + return GatherTestHelper<armnn::DataType::Signed32>::GatherMultiDimParamsMultiDimIndicesTestImpl( + workloadFactory, memoryManager); +}
\ No newline at end of file diff --git a/src/backends/backendsCommon/test/layerTests/GatherTestImpl.hpp b/src/backends/backendsCommon/test/layerTests/GatherTestImpl.hpp index b6a2dd17a0..0454c7777d 100644 --- a/src/backends/backendsCommon/test/layerTests/GatherTestImpl.hpp +++ b/src/backends/backendsCommon/test/layerTests/GatherTestImpl.hpp @@ -28,6 +28,10 @@ LayerTestResult<int16_t, 1> Gather1dParamsInt16Test( armnn::IWorkloadFactory& workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); +LayerTestResult<int32_t, 1> Gather1dParamsInt32Test( + armnn::IWorkloadFactory& workloadFactory, + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); + LayerTestResult<float, 2> GatherMultiDimParamsFloat32Test( armnn::IWorkloadFactory& workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); @@ -44,6 +48,10 @@ LayerTestResult<int16_t, 2> GatherMultiDimParamsInt16Test( armnn::IWorkloadFactory& workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); +LayerTestResult<int32_t, 2> GatherMultiDimParamsInt32Test( + armnn::IWorkloadFactory& workloadFactory, + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); + LayerTestResult<float, 4> GatherMultiDimParamsMultiDimIndicesFloat32Test( armnn::IWorkloadFactory& workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); @@ -59,3 +67,7 @@ LayerTestResult<uint8_t, 4> GatherMultiDimParamsMultiDimIndicesUint8Test( LayerTestResult<int16_t, 4> GatherMultiDimParamsMultiDimIndicesInt16Test( armnn::IWorkloadFactory& workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); + +LayerTestResult<int32_t, 4> GatherMultiDimParamsMultiDimIndicesInt32Test( + armnn::IWorkloadFactory& workloadFactory, + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager);
\ No newline at end of file diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index da8672a6c9..cef0c6b39b 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -2008,14 +2008,15 @@ bool RefLayerSupport::IsPreluSupported(const TensorInfo& input, { bool supported = true; - std::array<DataType, 6> supportedTypes + std::array<DataType, 7> supportedTypes { DataType::BFloat16, DataType::Float32, DataType::Float16, DataType::QAsymmS8, DataType::QAsymmU8, - DataType::QSymmS16 + DataType::QSymmS16, + DataType::Signed32, }; supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported, diff --git a/src/backends/reference/test/RefLayerTests.cpp b/src/backends/reference/test/RefLayerTests.cpp index 0250299c81..4086d3ca4a 100644 --- a/src/backends/reference/test/RefLayerTests.cpp +++ b/src/backends/reference/test/RefLayerTests.cpp @@ -1626,14 +1626,17 @@ ARMNN_AUTO_TEST_CASE(Gather1dParamsFloat32, Gather1dParamsFloat32Test) ARMNN_AUTO_TEST_CASE(Gather1dParamsFloat16, Gather1dParamsFloat16Test) ARMNN_AUTO_TEST_CASE(Gather1dParamsUint8, Gather1dParamsUint8Test) ARMNN_AUTO_TEST_CASE(Gather1dParamsInt16, Gather1dParamsInt16Test) +ARMNN_AUTO_TEST_CASE(Gather1dParamsInt32, Gather1dParamsInt32Test) ARMNN_AUTO_TEST_CASE(GatherMultiDimParamsFloat32, GatherMultiDimParamsFloat32Test) ARMNN_AUTO_TEST_CASE(GatherMultiDimParamsFloat16, GatherMultiDimParamsFloat16Test) ARMNN_AUTO_TEST_CASE(GatherMultiDimParamsUint8, GatherMultiDimParamsUint8Test) ARMNN_AUTO_TEST_CASE(GatherMultiDimParamsInt16, GatherMultiDimParamsInt16Test) +ARMNN_AUTO_TEST_CASE(GatherMultiDimParamsInt32, GatherMultiDimParamsInt32Test) ARMNN_AUTO_TEST_CASE(GatherMultiDimParamsMultiDimIndicesFloat32, GatherMultiDimParamsMultiDimIndicesFloat32Test) ARMNN_AUTO_TEST_CASE(GatherMultiDimParamsMultiDimIndicesFloat16, GatherMultiDimParamsMultiDimIndicesFloat16Test) ARMNN_AUTO_TEST_CASE(GatherMultiDimParamsMultiDimIndicesUint8, GatherMultiDimParamsMultiDimIndicesUint8Test) ARMNN_AUTO_TEST_CASE(GatherMultiDimParamsMultiDimIndicesInt16, GatherMultiDimParamsMultiDimIndicesInt16Test) +ARMNN_AUTO_TEST_CASE(GatherMultiDimParamsMultiDimIndicesInt32, GatherMultiDimParamsMultiDimIndicesInt32Test) // Abs ARMNN_AUTO_TEST_CASE(Abs2d, Abs2dTest<DataType::Float32>) |