diff options
author | Cathal Corbett <cathal.corbett@arm.com> | 2022-03-07 14:35:23 +0000 |
---|---|---|
committer | Cathal Corbett <cathal.corbett@arm.com> | 2022-03-31 12:05:14 +0000 |
commit | a6d99beb0dc6d31f958d262417877b0bcbd61b7c (patch) | |
tree | 38d8381a28a8cd135052764c39304fa51ceff62c | |
parent | 06a4a8b297aa3dc60ca8874b6d067cff1d44cb9d (diff) | |
download | android-nn-driver-a6d99beb0dc6d31f958d262417877b0bcbd61b7c.tar.gz |
IVGCVSW-6732 Tests surrounded in '#if defined(ARMNNREF_ENABLED)' in android-nn-driver do not execute.
* Change to ConvertionUtils.hpp fix ConcatTests_GpuAcc tests.
!armnn:7300
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
Change-Id: I1543b57c6d1f9660916ca530b421c87e54b13f72
-rw-r--r-- | ConversionUtils.hpp | 6 | ||||
-rw-r--r-- | test/Android.mk | 64 |
2 files changed, 67 insertions, 3 deletions
diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp index 8f7d5b9b..d06fad63 100644 --- a/ConversionUtils.hpp +++ b/ConversionUtils.hpp @@ -503,7 +503,7 @@ void SanitizeBiasQuantizationScale(armnn::TensorInfo& biasInfo, // 4D Tensor Permutations const armnn::PermutationVector IdentityPermutation4D({ 0U, 1U, 2U, 3U }); const armnn::PermutationVector IdentityPermutation3D({ 0U, 1U, 2U }); -const armnn::PermutationVector SwapDim1And2({ 0U, 2U, 1U, 3U }); +const armnn::PermutationVector SwapDim2And3({ 0U, 1U, 3U, 2U }); // 3D Permutation Vectors const armnn::PermutationVector RotateTensorLeft({ 1U, 2U, 0U }); @@ -651,8 +651,8 @@ bool CreateConcatPermutationParameters(const unsigned int numberOfDimensions, // or along dimension 0 or 2 for a 3-D tensor. if (numberOfDimensions == 4 && concatDimension == 2) { - concatDimension = 1; - permutationPair = std::make_pair(SwapDim1And2, SwapDim1And2); + concatDimension = 3; + permutationPair = std::make_pair(SwapDim2And3, SwapDim2And3); needPermute = true; } else if (numberOfDimensions == 3 && concatDimension == 1) diff --git a/test/Android.mk b/test/Android.mk index a417624f..930c7f91 100644 --- a/test/Android.mk +++ b/test/Android.mk @@ -52,6 +52,22 @@ LOCAL_CFLAGS := \ -O0 \ -UNDEBUG +# The variable to enable/disable the CL backend (ARMNN_COMPUTE_CL_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMCOMPUTECL_ENABLED +endif # ARMNN_COMPUTE_CL_ENABLED == 1 +# The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMCOMPUTENEON_ENABLED +endif # ARMNN_COMPUTE_NEON_ENABLED == 1 +# The variable to enable/disable the REFERENCE backend (ARMNN_REF_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_REF_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMNNREF_ENABLED +endif # ARMNN_REF_ENABLED == 1 + # Required to build with the changes made to the Android ML framework specific to Android R ifeq ($(ANDROID_R),1) LOCAL_CFLAGS+= \ @@ -165,6 +181,22 @@ LOCAL_CFLAGS := \ -UNDEBUG \ -DARMNN_ANDROID_NN_V1_1 +# The variable to enable/disable the CL backend (ARMNN_COMPUTE_CL_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMCOMPUTECL_ENABLED +endif # ARMNN_COMPUTE_CL_ENABLED == 1 +# The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMCOMPUTENEON_ENABLED +endif # ARMNN_COMPUTE_NEON_ENABLED == 1 +# The variable to enable/disable the REFERENCE backend (ARMNN_REF_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_REF_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMNNREF_ENABLED +endif # ARMNN_REF_ENABLED == 1 + # Required to build with the changes made to the Android ML framework specific to Android R ifeq ($(ANDROID_R),1) LOCAL_CFLAGS+= \ @@ -273,6 +305,22 @@ LOCAL_CFLAGS := \ -UNDEBUG \ -DARMNN_ANDROID_NN_V1_2 +# The variable to enable/disable the CL backend (ARMNN_COMPUTE_CL_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMCOMPUTECL_ENABLED +endif # ARMNN_COMPUTE_CL_ENABLED == 1 +# The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMCOMPUTENEON_ENABLED +endif # ARMNN_COMPUTE_NEON_ENABLED == 1 +# The variable to enable/disable the REFERENCE backend (ARMNN_REF_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_REF_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMNNREF_ENABLED +endif # ARMNN_REF_ENABLED == 1 + # Required to build with the changes made to the Android ML framework specific to Android R ifeq ($(ANDROID_R),1) LOCAL_CFLAGS+= \ @@ -381,6 +429,22 @@ LOCAL_CFLAGS := \ -UNDEBUG \ -DARMNN_ANDROID_NN_V1_3 +# The variable to enable/disable the CL backend (ARMNN_COMPUTE_CL_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMCOMPUTECL_ENABLED +endif # ARMNN_COMPUTE_CL_ENABLED == 1 +# The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMCOMPUTENEON_ENABLED +endif # ARMNN_COMPUTE_NEON_ENABLED == 1 +# The variable to enable/disable the REFERENCE backend (ARMNN_REF_ENABLED) is declared in android-nn-driver/Android.mk +ifeq ($(ARMNN_REF_ENABLED),1) +LOCAL_CFLAGS += \ + -DARMNNREF_ENABLED +endif # ARMNN_REF_ENABLED == 1 + ifeq ($(ANDROID_R),1) LOCAL_CFLAGS+= \ -DARMNN_ANDROID_R |