1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//test/xts/tools/build/suite.gni") 15module_output_path = "acts/nnrt" 16 17config("nncore_config") { 18 include_dirs = [ 19 "../common", 20 "../../../../../../foundation/ai/neural_network_runtime", 21 "//foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime", 22 "//foundation/ai/neural_network_runtime/frameworks/native/neural_network_core", 23 "//third_party/mindspore/mindspore-src/source/mindspore/lite/mindir/include", 24 ] 25 cflags = [ "-Wno-error" ] 26 cflags_cc = [ "-fexceptions" ] 27} 28 29ohos_moduletest_suite("ActsNncoreTest") { 30 module_out_path = module_output_path 31 sources = [ 32 "../common/mock_idevice.cpp", 33 "../common/nncore_utils.cpp", 34 "src/HdiCompilationTest.cpp", 35 "src/HdiExecutorTest.cpp", 36 "src/HdiModelTest.cpp", 37 "src/HdiTensorDescTest.cpp", 38 "src/HdiTensorTest.cpp", 39 ] 40 41 configs = [ ":nncore_config" ] 42 43 deps = [ 44 "//third_party/googletest:gmock", 45 "//third_party/googletest:gtest", 46 ] 47 48 external_deps = [ 49 "c_utils:utils", 50 "drivers_interface_nnrt:libnnrt_proxy_2.0", 51 "hilog:libhilog", 52 "ipc:ipc_single", 53 "mindspore:mindir", 54 "neural_network_runtime:nnrt_target", 55 ] 56 57 subsystem_name = "ai" 58 part_name = "neural_network_runtime" 59} 60