From: Jihoon Lee Date: Fri, 22 Oct 2021 12:22:53 +0000 (+0900) Subject: [Android] disable nnstreamer layer X-Git-Tag: accepted/tizen/unified/20220323.062643~257 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a903100c0d304ba3dd802d4c943fe13f482d0f3;p=platform%2Fcore%2Fml%2Fnntrainer.git [Android] disable nnstreamer layer This patch disables nnstreamer backbone because of the package issue for android build **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: Jihoon Lee --- diff --git a/api/capi/meson.build b/api/capi/meson.build index 60ae08c..147f103 100644 --- a/api/capi/meson.build +++ b/api/capi/meson.build @@ -9,7 +9,7 @@ capi_inc_abs = [ capi_src = [] capi_src += meson.current_source_dir() / 'src' / 'nntrainer.cpp' -if not nnstreamer_capi_dep.found() +if not nnstreamer_capi_dep.found() and get_option('platform') != 'android' error('nnstreamer capi dependency not found for tizen') endif diff --git a/jni/Android-prebuilt.mk b/jni/Android-prebuilt.mk index 7ef09ae..698d069 100644 --- a/jni/Android-prebuilt.mk +++ b/jni/Android-prebuilt.mk @@ -7,3 +7,12 @@ LOCAL_SRC_FILES := $(LOCAL_PATH)/lib/arm64-v8a/libccapi-nntrainer.so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include include $(PREBUILT_SHARED_LIBRARY) + +include $(CLEAR_VARS) + +LOCAL_MODULE := nntrainer + +LOCAL_SRC_FILES := $(LOCAL_PATH)/lib/$(TARGET_ARCH_ABI)/libnntrainer.so +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/include/nntrainer + +include $(PREBUILT_SHARED_LIBRARY) diff --git a/jni/meson.build b/jni/meson.build index a727fec..b656c9b 100644 --- a/jni/meson.build +++ b/jni/meson.build @@ -41,11 +41,12 @@ configure_file(input: 'Application.mk', output: 'Application.mk', copy: true ) +# below is list of file that meson acknowledges this is the output of custom target so that +# this has to be installed by meson outputs= [ 'libc++_shared.so', 'libcapi-nntrainer.so', 'libccapi-nntrainer.so', - 'libnnstreamer-native.so', 'libnntrainer.so' ] diff --git a/meson.build b/meson.build index 0ec4123..aa93252 100644 --- a/meson.build +++ b/meson.build @@ -219,10 +219,9 @@ else run_command(meson.source_root() / 'jni' / 'prepare_ml-api.sh', meson.build_root() / 'ml-api-inference', check: true) ml_api_common_root = meson.build_root() / 'ml-api-inference' ml_api_common_dep = found_dummy_dep - nnstreamer_capi_dep = found_dummy_dep endif -if get_option('enable-nnstreamer-backbone') +if get_option('enable-nnstreamer-backbone') and get_option('platform') != 'android' extra_defines += '-DENABLE_NNSTREAMER_BACKBONE=1' endif @@ -311,6 +310,7 @@ if get_option('enable-app') if get_option('platform') == 'android' warning('android app is not supported for now, building app skipped') else + # this is needed for reinforcement application. We can move this to reinforecement app dependency jsoncpp_dep = dependency('jsoncpp') # jsoncpp libcurl_dep = dependency('libcurl') if not tflite_dep.found() diff --git a/nntrainer/layers/meson.build b/nntrainer/layers/meson.build index b5e8e31..e45ef88 100644 --- a/nntrainer/layers/meson.build +++ b/nntrainer/layers/meson.build @@ -44,7 +44,8 @@ layer_headers = [ layer_deps = [] -if get_option('enable-nnstreamer-backbone') +# for android, it is disabled until we have support for the nnstreamer package +if get_option('enable-nnstreamer-backbone') and get_option('platform') != 'android' if not nnstreamer_capi_dep.found() error('NNStreamer CAPI dependency not found') endif