1f6603c60Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
2f6603c60Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3f6603c60Sopenharmony_ci# you may not use this file except in compliance with the License.
4f6603c60Sopenharmony_ci# You may obtain a copy of the License at
5f6603c60Sopenharmony_ci#
6f6603c60Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7f6603c60Sopenharmony_ci#
8f6603c60Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9f6603c60Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10f6603c60Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11f6603c60Sopenharmony_ci# See the License for the specific language governing permissions and
12f6603c60Sopenharmony_ci# limitations under the License.
13f6603c60Sopenharmony_ci
14f6603c60Sopenharmony_ciimport("//test/xts/tools/build/suite.gni")
15f6603c60Sopenharmony_cimodule_output_path = "acts/nnrt"
16f6603c60Sopenharmony_ci
17f6603c60Sopenharmony_ciconfig("ops_config") {
18f6603c60Sopenharmony_ci  include_dirs = [
19f6603c60Sopenharmony_ci    "include",
20f6603c60Sopenharmony_ci    "../../../../../../foundation/ai/neural_network_runtime",
21f6603c60Sopenharmony_ci    "../../../../../../foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime",
22f6603c60Sopenharmony_ci    "../../../../../../foundation/ai/neural_network_runtime/frameworks/native/neural_network_core",
23f6603c60Sopenharmony_ci    "../../../../../../third_party/mindspore/mindspore-src/source/mindspore/lite/mindir/include",
24f6603c60Sopenharmony_ci  ]
25f6603c60Sopenharmony_ci  cflags = [ "-Wno-error" ]
26f6603c60Sopenharmony_ci  cflags_cc = [ "-fexceptions" ]
27f6603c60Sopenharmony_ci}
28f6603c60Sopenharmony_ci
29f6603c60Sopenharmony_ciohos_moduletest_suite("ActsNnrtOpsTest") {
30f6603c60Sopenharmony_ci  module_out_path = module_output_path
31f6603c60Sopenharmony_ci  sources = [
32f6603c60Sopenharmony_ci    "src/abs_test.cpp",
33f6603c60Sopenharmony_ci    "src/all_test.cpp",
34f6603c60Sopenharmony_ci    "src/assert_test.cpp",
35f6603c60Sopenharmony_ci    "src/broadcast_to_test.cpp",
36f6603c60Sopenharmony_ci    "src/ceil_test.cpp",
37f6603c60Sopenharmony_ci    "src/clip_test.cpp",
38f6603c60Sopenharmony_ci    "src/constant_of_shape_test.cpp",
39f6603c60Sopenharmony_ci    "src/cos_test.cpp",
40f6603c60Sopenharmony_ci    "src/crop_test.cpp",
41f6603c60Sopenharmony_ci    "src/depth_to_space_test.cpp",
42f6603c60Sopenharmony_ci    "src/detection_post_process_test.cpp",
43f6603c60Sopenharmony_ci    "src/equal_test.cpp",
44f6603c60Sopenharmony_ci    "src/erf_test.cpp",
45f6603c60Sopenharmony_ci    "src/exp_test.cpp",
46f6603c60Sopenharmony_ci    "src/flatten_test.cpp",
47f6603c60Sopenharmony_ci    "src/floor_test.cpp",
48f6603c60Sopenharmony_ci    "src/gather_nd_test.cpp",
49f6603c60Sopenharmony_ci    "src/greater_equal_test.cpp",
50f6603c60Sopenharmony_ci    "src/greater_test.cpp",
51f6603c60Sopenharmony_ci    "src/hard_sigmoid_test.cpp",
52f6603c60Sopenharmony_ci    "src/instance_norm_test.cpp",
53f6603c60Sopenharmony_ci    "src/l2_normalize_test.cpp",
54f6603c60Sopenharmony_ci    "src/leaky_relu_test.cpp",
55f6603c60Sopenharmony_ci    "src/less_test.cpp",
56f6603c60Sopenharmony_ci    "src/log_softmax_test.cpp",
57f6603c60Sopenharmony_ci    "src/log_test.cpp",
58f6603c60Sopenharmony_ci    "src/logical_and_test.cpp",
59f6603c60Sopenharmony_ci    "src/logical_not_test.cpp",
60f6603c60Sopenharmony_ci    "src/logical_or_test.cpp",
61f6603c60Sopenharmony_ci    "src/lrn_test.cpp",
62f6603c60Sopenharmony_ci    "src/lstm_test.cpp",
63f6603c60Sopenharmony_ci    "src/minimum_test.cpp",
64f6603c60Sopenharmony_ci    "src/mock_idevice.cpp",
65f6603c60Sopenharmony_ci    "src/mod_test.cpp",
66f6603c60Sopenharmony_ci    "src/neg_test.cpp",
67f6603c60Sopenharmony_ci    "src/nncore_utils.cpp",
68f6603c60Sopenharmony_ci    "src/not_equal_test.cpp",
69f6603c60Sopenharmony_ci    "src/pow_test.cpp",
70f6603c60Sopenharmony_ci    "src/quant_dtype_cast_test.cpp",
71f6603c60Sopenharmony_ci    "src/range_test.cpp",
72f6603c60Sopenharmony_ci    "src/rank_test.cpp",
73f6603c60Sopenharmony_ci    "src/reciprocal_test.cpp",
74f6603c60Sopenharmony_ci    "src/reducel2_test.cpp",
75f6603c60Sopenharmony_ci    "src/reducemax_test.cpp",
76f6603c60Sopenharmony_ci    "src/reducemin_test.cpp",
77f6603c60Sopenharmony_ci    "src/reducesum_test.cpp",
78f6603c60Sopenharmony_ci    "src/round_test.cpp",
79f6603c60Sopenharmony_ci    "src/scatter_nd_test.cpp",
80f6603c60Sopenharmony_ci    "src/select_test.cpp",
81f6603c60Sopenharmony_ci    "src/sin_test.cpp",
82f6603c60Sopenharmony_ci    "src/space_to_depth_test.cpp",
83f6603c60Sopenharmony_ci    "src/sparse_to_dense_test.cpp",
84f6603c60Sopenharmony_ci    "src/square_test.cpp",
85f6603c60Sopenharmony_ci    "src/swish_test.cpp",
86f6603c60Sopenharmony_ci    "src/unstack_test.cpp",
87f6603c60Sopenharmony_ci    "src/where_test.cpp",
88f6603c60Sopenharmony_ci  ]
89f6603c60Sopenharmony_ci
90f6603c60Sopenharmony_ci  configs = [ ":ops_config" ]
91f6603c60Sopenharmony_ci
92f6603c60Sopenharmony_ci  deps = [
93f6603c60Sopenharmony_ci    "//third_party/googletest:gmock",
94f6603c60Sopenharmony_ci    "//third_party/googletest:gtest",
95f6603c60Sopenharmony_ci  ]
96f6603c60Sopenharmony_ci
97f6603c60Sopenharmony_ci  external_deps = [
98f6603c60Sopenharmony_ci    "c_utils:utils",
99f6603c60Sopenharmony_ci    "drivers_interface_nnrt:libnnrt_proxy_2.1",
100f6603c60Sopenharmony_ci    "hilog:libhilog",
101f6603c60Sopenharmony_ci    "ipc:ipc_single",
102f6603c60Sopenharmony_ci    "mindspore:mindir",
103f6603c60Sopenharmony_ci    "neural_network_runtime:nnrt_target",
104f6603c60Sopenharmony_ci  ]
105f6603c60Sopenharmony_ci
106f6603c60Sopenharmony_ci  subsystem_name = "ai"
107f6603c60Sopenharmony_ci  part_name = "neural_network_runtime"
108f6603c60Sopenharmony_ci}
109