1# Copyright (c) 2024 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("ops_config") { 18 include_dirs = [ 19 "include", 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("ActsNnrtOpsTest") { 30 module_out_path = module_output_path 31 sources = [ 32 "src/abs_test.cpp", 33 "src/all_test.cpp", 34 "src/assert_test.cpp", 35 "src/broadcast_to_test.cpp", 36 "src/ceil_test.cpp", 37 "src/clip_test.cpp", 38 "src/constant_of_shape_test.cpp", 39 "src/cos_test.cpp", 40 "src/crop_test.cpp", 41 "src/depth_to_space_test.cpp", 42 "src/detection_post_process_test.cpp", 43 "src/equal_test.cpp", 44 "src/erf_test.cpp", 45 "src/exp_test.cpp", 46 "src/flatten_test.cpp", 47 "src/floor_test.cpp", 48 "src/gather_nd_test.cpp", 49 "src/greater_equal_test.cpp", 50 "src/greater_test.cpp", 51 "src/hard_sigmoid_test.cpp", 52 "src/instance_norm_test.cpp", 53 "src/l2_normalize_test.cpp", 54 "src/leaky_relu_test.cpp", 55 "src/less_test.cpp", 56 "src/log_softmax_test.cpp", 57 "src/log_test.cpp", 58 "src/logical_and_test.cpp", 59 "src/logical_not_test.cpp", 60 "src/logical_or_test.cpp", 61 "src/lrn_test.cpp", 62 "src/lstm_test.cpp", 63 "src/minimum_test.cpp", 64 "src/mock_idevice.cpp", 65 "src/mod_test.cpp", 66 "src/neg_test.cpp", 67 "src/nncore_utils.cpp", 68 "src/not_equal_test.cpp", 69 "src/pow_test.cpp", 70 "src/quant_dtype_cast_test.cpp", 71 "src/range_test.cpp", 72 "src/rank_test.cpp", 73 "src/reciprocal_test.cpp", 74 "src/reducel2_test.cpp", 75 "src/reducemax_test.cpp", 76 "src/reducemin_test.cpp", 77 "src/reducesum_test.cpp", 78 "src/round_test.cpp", 79 "src/scatter_nd_test.cpp", 80 "src/select_test.cpp", 81 "src/sin_test.cpp", 82 "src/space_to_depth_test.cpp", 83 "src/sparse_to_dense_test.cpp", 84 "src/square_test.cpp", 85 "src/swish_test.cpp", 86 "src/unstack_test.cpp", 87 "src/where_test.cpp", 88 ] 89 90 configs = [ ":ops_config" ] 91 92 deps = [ 93 "//third_party/googletest:gmock", 94 "//third_party/googletest:gtest", 95 ] 96 97 external_deps = [ 98 "c_utils:utils", 99 "drivers_interface_nnrt:libnnrt_proxy_2.1", 100 "hilog:libhilog", 101 "ipc:ipc_single", 102 "mindspore:mindir", 103 "neural_network_runtime:nnrt_target", 104 ] 105 106 subsystem_name = "ai" 107 part_name = "neural_network_runtime" 108} 109