aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralered01 <Alex.Redshaw@arm.com>2020-04-03 15:37:24 +0100
committeralered01 <Alex.Redshaw@arm.com>2020-04-03 17:11:01 +0100
commit7c395b200ae7ec2d5999dfecd84a79bcfb94eb19 (patch)
treeb8f719137fbd95c35789cf8464cfc09cccd019ed
parent871fe6dc35bb5dfb0a855910bd4fb004ed0f7e72 (diff)
downloadandroid-nn-driver-7c395b200ae7ec2d5999dfecd84a79bcfb94eb19.tar.gz
Add flow to exclude libOpenCL when building AndroidnNN
When building AndroidNN for a commercial silicon device, there's no need to include libOpenCL as we should be able to use the one already on the device Change-Id: I5ef5776010399dd2d2d48958465daf4b71e4f825 Signed-off-by: alered01 <Alex.Redshaw@arm.com>
-rw-r--r--Android.mk20
-rw-r--r--test/Android.mk6
2 files changed, 16 insertions, 10 deletions
diff --git a/Android.mk b/Android.mk
index bac6db1..581ce9e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -66,6 +66,12 @@ ifeq ($(PLATFORM_VERSION),R)
ARMNN_COMPUTE_CL_ENABLED := 0
endif # PLATFORM_VERSION == R
+# Variable to control inclusion of libOpenCL shared library
+ARMNN_INCLUDE_LIBOPENCL := $(ARMNN_COMPUTE_CL_ENABLED)
+ifeq ($(ARMNN_LIBOPENCL),0)
+ARMNN_INCLUDE_LIBOPENCL := 0
+endif
+
#######################
# libarmnn-driver@1.0 #
#######################
@@ -304,7 +310,7 @@ LOCAL_SHARED_LIBRARIES+= \
android.hardware.neuralnetworks@1.3
endif # R or later
-ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1)
LOCAL_SHARED_LIBRARIES+= \
libOpenCL
endif
@@ -418,7 +424,7 @@ LOCAL_SHARED_LIBRARIES+= \
android.hardware.neuralnetworks@1.3
endif # R or later
-ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1)
LOCAL_SHARED_LIBRARIES+= \
libOpenCL
endif
@@ -526,7 +532,7 @@ LOCAL_SHARED_LIBRARIES := \
android.hardware.neuralnetworks@1.2 \
android.hardware.neuralnetworks@1.3
-ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1)
LOCAL_SHARED_LIBRARIES+= \
libOpenCL
endif
@@ -628,7 +634,7 @@ LOCAL_SHARED_LIBRARIES+= \
android.hardware.neuralnetworks@1.3
endif # R or later
-ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1)
LOCAL_SHARED_LIBRARIES+= \
libOpenCL
endif
@@ -726,7 +732,7 @@ LOCAL_SHARED_LIBRARIES+= \
android.hardware.neuralnetworks@1.3
endif # PLATFORM_VERSION == R
-ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1)
LOCAL_SHARED_LIBRARIES+= \
libOpenCL
endif
@@ -813,7 +819,7 @@ LOCAL_SHARED_LIBRARIES+= \
android.hardware.neuralnetworks@1.3
endif # R or later
-ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1)
LOCAL_SHARED_LIBRARIES+= \
libOpenCL
endif
@@ -891,7 +897,7 @@ LOCAL_SHARED_LIBRARIES := \
android.hardware.neuralnetworks@1.2 \
android.hardware.neuralnetworks@1.3
-ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1)
LOCAL_SHARED_LIBRARIES+= \
libOpenCL
endif
diff --git a/test/Android.mk b/test/Android.mk
index 0448d18..17def76 100644
--- a/test/Android.mk
+++ b/test/Android.mk
@@ -112,7 +112,7 @@ LOCAL_SHARED_LIBRARIES+= \
android.hardware.neuralnetworks@1.3
endif # R or later
-ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1)
LOCAL_SHARED_LIBRARIES+= \
libOpenCL
endif
@@ -221,7 +221,7 @@ LOCAL_SHARED_LIBRARIES+= \
android.hardware.neuralnetworks@1.3
endif # R or later
-ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1)
LOCAL_SHARED_LIBRARIES+= \
libOpenCL
endif
@@ -323,7 +323,7 @@ LOCAL_SHARED_LIBRARIES+= \
android.hardware.neuralnetworks@1.3
endif # R or later
-ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+ifeq ($(ARMNN_INCLUDE_LIBOPENCL),1)
LOCAL_SHARED_LIBRARIES+= \
libOpenCL
endif