Przemyslaw Szczepaniak | a8ff13f | 2018-05-17 14:19:44 +0100 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2015 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
| 19 | include $(CLEAR_VARS) |
Viet Dang | 540bd3e | 2021-02-16 14:10:59 +0000 | [diff] [blame] | 20 | LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules collector-device-lib |
Przemyslaw Szczepaniak | f1e9334 | 2018-10-10 14:16:53 +0100 | [diff] [blame] | 21 | LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs |
Przemyslaw Szczepaniak | a8ff13f | 2018-05-17 14:19:44 +0100 | [diff] [blame] | 22 | |
| 23 | LOCAL_MODULE_TAGS := tests |
| 24 | LOCAL_COMPATIBILITY_SUITE += device-tests |
| 25 | |
Ian Hua | 3221609 | 2022-02-21 16:23:06 +0000 | [diff] [blame] | 26 | # List of NNAPI SL libraries for different chipsets, which are determined by SL release notes. |
Ian Hua | 5c7ee94 | 2022-04-07 15:53:16 +0100 | [diff] [blame] | 27 | QC_SM8350_NNAPI_SL_LIBS := libnnapi_sl_driver libQnnGpu libQnnHtp libQnnHtpPrepare libQnnHtpV68Skel libQnnHtpV68Stub libUnnhalAccGpu libUnnhalAccHtp |
| 28 | QC_SM8450_NNAPI_SL_LIBS := libnnapi_sl_driver libQnnGpu libQnnHtp libQnnHtpPrepare libQnnHtpV69Skel libQnnHtpV69Stub libUnnhalAccGpu libUnnhalAccHtp |
Stefano Galarraga | fdbb44e | 2021-10-04 17:20:17 +0100 | [diff] [blame] | 29 | |
| 30 | # Set the set of SL libraries to use in this test. By default including all |
| 31 | # chipsets, you can override this variable with a chipset specific one (see |
| 32 | # QC_SMxxxx_NNAPI_SL_LIBS) test a more realistic NNAPI SL distribution scenario. |
| 33 | ifeq ($(strip $(SL_LIBS)),) |
| 34 | SL_LIBS := $(patsubst $(LOCAL_PATH)/sl_prebuilt/%.so,%,$(wildcard $(LOCAL_PATH)/sl_prebuilt/*.so)) |
| 35 | endif |
| 36 | |
Stefano Galarraga | 650bda5 | 2020-06-17 11:03:07 +0100 | [diff] [blame] | 37 | LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/nn/benchmark) |
Stefano Galarraga | 731fc14 | 2021-10-18 17:34:25 +0100 | [diff] [blame] | 38 | LOCAL_JNI_SHARED_LIBRARIES := libnnbenchmark_jni libsupport_library_jni $(SL_LIBS) |
Przemyslaw Szczepaniak | a8ff13f | 2018-05-17 14:19:44 +0100 | [diff] [blame] | 39 | |
Chih-Hung Hsieh | bdc9345 | 2020-01-27 11:34:37 -0800 | [diff] [blame] | 40 | # need fread_unlocked in version 28 |
| 41 | LOCAL_SDK_VERSION := 28 |
Przemyslaw Szczepaniak | a8ff13f | 2018-05-17 14:19:44 +0100 | [diff] [blame] | 42 | LOCAL_ASSET_DIR := $(LOCAL_PATH)/../models/assets |
| 43 | |
David Rim | e441c87 | 2018-06-01 15:55:11 +0900 | [diff] [blame] | 44 | GOOGLE_TEST_MODELS_DIR := vendor/google/tests/mlts/models/assets |
| 45 | ifneq ($(wildcard $(GOOGLE_TEST_MODELS_DIR)),) |
| 46 | LOCAL_ASSET_DIR += $(GOOGLE_TEST_MODELS_DIR) |
| 47 | endif |
| 48 | |
Stefano Galarraga | fdbb44e | 2021-10-04 17:20:17 +0100 | [diff] [blame] | 49 | # This folder contains metadata describing the SL library distribution. |
| 50 | # Currently the only one is a file sl_prebuilt_filelist.txt with the list of libraries |
| 51 | # in this SL. The file is generated by the build_and_run_benchmark.sh script |
| 52 | # and is used to know the list of files to extract if the user |
| 53 | SL_PREBUILT_METADATA_DIR := $(LOCAL_PATH)/sl_prebuilt/assets |
| 54 | ifneq ($(wildcard $(SL_PREBUILT_METADATA_DIR)),) |
| 55 | LOCAL_ASSET_DIR += $(SL_PREBUILT_METADATA_DIR) |
Stefano Galarraga | 57b6e4c | 2021-09-10 15:18:12 +0100 | [diff] [blame] | 56 | endif |
| 57 | |
Viet Dang | 1f0f440 | 2019-01-09 17:41:26 +0000 | [diff] [blame] | 58 | LOCAL_PACKAGE_NAME := NeuralNetworksApiBenchmark |
Bob Badour | e6cb091 | 2021-04-23 16:15:07 -0700 | [diff] [blame] | 59 | LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT |
| 60 | LOCAL_LICENSE_CONDITIONS := notice |
| 61 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE |
Przemyslaw Szczepaniak | a8ff13f | 2018-05-17 14:19:44 +0100 | [diff] [blame] | 62 | include $(BUILD_PACKAGE) |
Viet Dang | ab62f60 | 2018-12-11 17:07:17 +0000 | [diff] [blame] | 63 | |
Viet Dang | 1f0f440 | 2019-01-09 17:41:26 +0000 | [diff] [blame] | 64 | include $(CLEAR_VARS) |
Stefano Galarraga | 650bda5 | 2020-06-17 11:03:07 +0100 | [diff] [blame] | 65 | |
| 66 | LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules |
| 67 | LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs |
| 68 | |
| 69 | LOCAL_MODULE_TAGS := tests |
| 70 | LOCAL_COMPATIBILITY_SUITE += device-tests |
| 71 | |
| 72 | LOCAL_SRC_FILES := $(call all-java-files-under, src) |
Stefano Galarraga | 731fc14 | 2021-10-18 17:34:25 +0100 | [diff] [blame] | 73 | LOCAL_JNI_SHARED_LIBRARIES := libnnbenchmark_jni libsupport_library_jni librandom_graph_test_jni $(SL_LIBS) |
Stefano Galarraga | 650bda5 | 2020-06-17 11:03:07 +0100 | [diff] [blame] | 74 | |
| 75 | # need fread_unlocked in version 28 |
| 76 | LOCAL_SDK_VERSION := 28 |
| 77 | LOCAL_ASSET_DIR := $(LOCAL_PATH)/../models/assets |
| 78 | |
| 79 | GOOGLE_TEST_MODELS_DIR := vendor/google/tests/mlts/models/assets |
| 80 | ifneq ($(wildcard $(GOOGLE_TEST_MODELS_DIR)),) |
| 81 | LOCAL_ASSET_DIR += $(GOOGLE_TEST_MODELS_DIR) |
| 82 | endif |
| 83 | |
Ian Hua | 7ec0f3c | 2022-02-23 16:15:37 +0000 | [diff] [blame] | 84 | SL_PREBUILT_METADATA_DIR := $(LOCAL_PATH)/sl_prebuilt/assets |
| 85 | ifneq ($(wildcard $(SL_PREBUILT_METADATA_DIR)),) |
| 86 | LOCAL_ASSET_DIR += $(SL_PREBUILT_METADATA_DIR) |
| 87 | endif |
| 88 | |
Stefano Galarraga | 650bda5 | 2020-06-17 11:03:07 +0100 | [diff] [blame] | 89 | LOCAL_PACKAGE_NAME := NeuralNetworksApiCrashTest |
Bob Badour | e6cb091 | 2021-04-23 16:15:07 -0700 | [diff] [blame] | 90 | LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT |
| 91 | LOCAL_LICENSE_CONDITIONS := notice |
| 92 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE |
Stefano Galarraga | 650bda5 | 2020-06-17 11:03:07 +0100 | [diff] [blame] | 93 | include $(BUILD_PACKAGE) |
| 94 | |
Viet Dang | ab62f60 | 2018-12-11 17:07:17 +0000 | [diff] [blame] | 95 | include $(call all-makefiles-under,$(LOCAL_PATH)) |