• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 Huawei Technologies Co., Ltd
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# ============================================================================
15
16import("//build/ohos.gni")
17
18ohos_group("mindspore") {
19  deps = [
20    ":mindspore_lib",
21    "mindir:mindir",
22
23    #"tools/benchmark:benchmark_bin",
24  ]
25}
26
27ohos_shared_library("mindspore_lib") {
28  common_sources = [
29    "../core/utils/status.cc",
30    "src/c_api/context_c.cc",
31    "src/c_api/model_c.cc",
32    "src/c_api/tensor_c.cc",
33    "src/common/config_file.cc",
34    "src/common/context_util.cc",
35    "src/common/dynamic_library_loader.cc",
36    "src/common/file_utils.cc",
37    "src/common/graph_util.cc",
38    "src/common/lite_utils.cc",
39    "src/common/log.cc",
40    "src/common/prim_util.cc",
41    "src/common/quant_utils.cc",
42    "src/common/string_util.cc",
43    "src/common/tensor_util.cc",
44    "src/common/utils.cc",
45    "src/cpu_info.cc",
46    "src/cxx_api/cell.cc",
47    "src/cxx_api/context.cc",
48    "src/cxx_api/converters.cc",
49    "src/cxx_api/graph/graph.cc",
50    "src/cxx_api/kernel.cc",
51    "src/cxx_api/model/model.cc",
52    "src/cxx_api/model/model_impl.cc",
53    "src/cxx_api/serialization.cc",
54    "src/cxx_api/tensor/tensor_impl.cc",
55    "src/cxx_api/tensor_utils.cc",
56    "src/cxx_api/types.cc",
57    "src/errorcode.cc",
58    "src/executor.cc",
59    "src/huffman_decode.cc",
60    "src/inner_context.cc",
61    "src/inner_kernel.cc",
62    "src/kernel_registry.cc",
63    "src/lite_kernel.cc",
64    "src/lite_kernel_util.cc",
65    "src/lite_mindrt.cc",
66    "src/lite_model.cc",
67    "src/lite_session.cc",
68    "src/mindrt_executor.cc",
69    "src/ms_tensor.cc",
70    "src/ops/compat/attr_transfer_common.cc",
71    "src/ops/compat/v0/broadcast_to_compat_v0.cc",
72    "src/ops/compat/v0/cast_compat_v0.cc",
73    "src/ops/compat/v0/expand_dims_compat_v0.cc",
74    "src/ops/compat/v0/fill_compat_v0.cc",
75    "src/ops/compat/v0/gather_compat_v0.cc",
76    "src/ops/compat/v0/nchw2nhwc_compat_v0.cc",
77    "src/ops/compat/v0/nhwc2nchw_compat_v0.cc",
78    "src/ops/compat/v0/pad_compat_v0.cc",
79    "src/ops/compat/v0/permute_compat_v0.cc",
80    "src/ops/compat/v0/power_compat_v0.cc",
81    "src/ops/compat/v0/reduce_compat_v0.cc",
82    "src/ops/compat/v0/reshape_compat_v0.cc",
83    "src/ops/compat/v0/slice_compat_v0.cc",
84    "src/ops/compat/v0/strided_slice_compat_v0.cc",
85    "src/ops/compat/v0/tile_compat_v0.cc",
86    "src/ops/compat/v0/topk_compat_v0.cc",
87    "src/ops/compat/v0/transpose_compat_v0.cc",
88    "src/ops/ops_def.cc",
89    "src/ops/ops_utils.cc",
90    "src/ops/populate/activation_grad_populate.cc",
91    "src/ops/populate/activation_populate.cc",
92    "src/ops/populate/adam_populate.cc",
93    "src/ops/populate/add_populate.cc",
94    "src/ops/populate/adder_populate.cc",
95    "src/ops/populate/affine_populate.cc",
96    "src/ops/populate/argmax_populate.cc",
97    "src/ops/populate/argmin_populate.cc",
98    "src/ops/populate/arithmetic_populate.cc",
99    "src/ops/populate/arithmetic_self_populate.cc",
100    "src/ops/populate/assert_populate.cc",
101    "src/ops/populate/assign_add_populate.cc",
102    "src/ops/populate/assign_populate.cc",
103    "src/ops/populate/audio_spectrogram_populate.cc",
104    "src/ops/populate/batch_norm_populate.cc",
105    "src/ops/populate/batch_to_space_populate.cc",
106    "src/ops/populate/bias_add_populate.cc",
107    "src/ops/populate/binary_cross_entropy_grad_populate.cc",
108    "src/ops/populate/binary_cross_entropy_populate.cc",
109    "src/ops/populate/broadcast_to_populate.cc",
110    "src/ops/populate/call_populate.cc",
111    "src/ops/populate/cast_populate.cc",
112    "src/ops/populate/clip_populate.cc",
113    "src/ops/populate/common_populate.cc",
114    "src/ops/populate/concat_populate.cc",
115    "src/ops/populate/constant_of_shape_populate.cc",
116    "src/ops/populate/control/switch_populate.cc",
117    "src/ops/populate/control/tensor_array_populate.cc",
118    "src/ops/populate/control/tensorlistfromtensor_populate.cc",
119    "src/ops/populate/control/tensorlistgetitem_populate.cc",
120    "src/ops/populate/control/tensorlistreserve_populate.cc",
121    "src/ops/populate/control/tensorlistsetlitem_populate.cc",
122    "src/ops/populate/control/tensorliststack_populate.cc",
123    "src/ops/populate/conv2d_populate.cc",
124    "src/ops/populate/crop_and_resize_populate.cc",
125    "src/ops/populate/crop_populate.cc",
126    "src/ops/populate/cumsum_populate.cc",
127    "src/ops/populate/deconv2d_populate.cc",
128    "src/ops/populate/default_populate.cc",
129    "src/ops/populate/depth_to_space_populate.cc",
130    "src/ops/populate/detection_post_process_populate.cc",
131    "src/ops/populate/div_populate.cc",
132    "src/ops/populate/eltwise_populate.cc",
133    "src/ops/populate/embedding_lookup_populate.cc",
134    "src/ops/populate/erf_populate.cc",
135    "src/ops/populate/exp_populate.cc",
136    "src/ops/populate/expand_dims_populate.cc",
137    "src/ops/populate/fill_populate.cc",
138    "src/ops/populate/flatten_populate.cc",
139    "src/ops/populate/full_connection_populate.cc",
140    "src/ops/populate/fused_batchnorm_populate.cc",
141    "src/ops/populate/gather_nd_populate.cc",
142    "src/ops/populate/gather_populate.cc",
143    "src/ops/populate/glu_populate.cc",
144    "src/ops/populate/gru_populate.cc",
145    "src/ops/populate/instance_norm_populate.cc",
146    "src/ops/populate/invert_permutation_populate.cc",
147    "src/ops/populate/isfinite_populate.cc",
148    "src/ops/populate/l2_norm_populate.cc",
149    "src/ops/populate/layer_norm_grad_populate.cc",
150    "src/ops/populate/layer_norm_populate.cc",
151    "src/ops/populate/lin_space_populate.cc",
152    "src/ops/populate/local_response_normalization_populate.cc",
153    "src/ops/populate/log_softmax_populate.cc",
154    "src/ops/populate/lstm_populate.cc",
155    "src/ops/populate/matmul_populate.cc",
156    "src/ops/populate/mfcc_populate.cc",
157    "src/ops/populate/mul_populate.cc",
158    "src/ops/populate/non_max_suppression_populate.cc",
159    "src/ops/populate/nonzero_populate.cc",
160    "src/ops/populate/one_hot_populate.cc",
161    "src/ops/populate/oneslike_populate.cc",
162    "src/ops/populate/p_relu_populate.cc",
163    "src/ops/populate/pad_populate.cc",
164    "src/ops/populate/partial_populate.cc",
165    "src/ops/populate/pooling_populate.cc",
166    "src/ops/populate/populate_register.cc",
167    "src/ops/populate/power_populate.cc",
168    "src/ops/populate/prior_box_populate.cc",
169    "src/ops/populate/quant_dtype_cast_populate.cc",
170    "src/ops/populate/ragged_range_populate.cc",
171    "src/ops/populate/random_standard_normal_populate.cc",
172    "src/ops/populate/range_populate.cc",
173    "src/ops/populate/rank_populate.cc",
174    "src/ops/populate/reduce_populate.cc",
175    "src/ops/populate/reshape_populate.cc",
176    "src/ops/populate/resize_populate.cc",
177    "src/ops/populate/reverse_populate.cc",
178    "src/ops/populate/reverse_sequence_populate.cc",
179    "src/ops/populate/roi_pooling_populate.cc",
180    "src/ops/populate/scale_populate.cc",
181    "src/ops/populate/scatter_nd_populate.cc",
182    "src/ops/populate/scatter_nd_update_populate.cc",
183    "src/ops/populate/select_populate.cc",
184    "src/ops/populate/shape_populate.cc",
185    "src/ops/populate/size_populate.cc",
186    "src/ops/populate/slice_populate.cc",
187    "src/ops/populate/softmax_populate.cc",
188    "src/ops/populate/space_to_batch_nd_populate.cc",
189    "src/ops/populate/space_to_batch_populate.cc",
190    "src/ops/populate/space_to_depth_populate.cc",
191    "src/ops/populate/sparse_softmax_cross_entropy_with_logits.cc",
192    "src/ops/populate/sparse_to_dense_populate.cc",
193    "src/ops/populate/splice_populate.cc",
194    "src/ops/populate/split_populate.cc",
195    "src/ops/populate/split_with_overlap_populate.cc",
196    "src/ops/populate/squeeze_populate.cc",
197    "src/ops/populate/stack_populate.cc",
198    "src/ops/populate/strided_slice_grad_populate.cc",
199    "src/ops/populate/strided_slice_populate.cc",
200    "src/ops/populate/string/custom_extract_features_populate.cc",
201    "src/ops/populate/string/custom_normalize_populate.cc",
202    "src/ops/populate/string/custom_predict_populate.cc",
203    "src/ops/populate/string/hashtable_lookup_populate.cc",
204    "src/ops/populate/string/lsh_projection_populate.cc",
205    "src/ops/populate/string/skip_gram_populate.cc",
206    "src/ops/populate/sub_populate.cc",
207    "src/ops/populate/tile_populate.cc",
208    "src/ops/populate/topk_populate.cc",
209    "src/ops/populate/transpose_populate.cc",
210    "src/ops/populate/uniform_real_populate.cc",
211    "src/ops/populate/unique_populate.cc",
212    "src/ops/populate/unsorted_segment_sum_populate.cc",
213    "src/ops/populate/unsqueeze_populate.cc",
214    "src/ops/populate/unstack_populate.cc",
215    "src/ops/populate/v0/activation_grad_populate_v0.cc",
216    "src/ops/populate/v0/activation_populate_v0.cc",
217    "src/ops/populate/v0/adam_populate_v0.cc",
218    "src/ops/populate/v0/add_populate_v0.cc",
219    "src/ops/populate/v0/addn_populate_v0.cc",
220    "src/ops/populate/v0/argmax_populate_v0.cc",
221    "src/ops/populate/v0/argmin_populate_v0.cc",
222    "src/ops/populate/v0/arithmetic_populate_v0.cc",
223    "src/ops/populate/v0/arithmetic_self_populate_v0.cc",
224    "src/ops/populate/v0/assert_populate_v0.cc",
225    "src/ops/populate/v0/assign_add_populate_v0.cc",
226    "src/ops/populate/v0/assign_populate_v0.cc",
227    "src/ops/populate/v0/batch_norm_populate_v0.cc",
228    "src/ops/populate/v0/batch_to_space_populate_v0.cc",
229    "src/ops/populate/v0/bias_add_populate_v0.cc",
230    "src/ops/populate/v0/bias_grad_populate_v0.cc",
231    "src/ops/populate/v0/binary_cross_entropy_grad_populate_v0.cc",
232    "src/ops/populate/v0/binary_cross_entropy_populate_v0.cc",
233    "src/ops/populate/v0/broadcast_to_populate_v0.cc",
234    "src/ops/populate/v0/cast_populate_v0.cc",
235    "src/ops/populate/v0/clip_populate_v0.cc",
236    "src/ops/populate/v0/common_populate_v0.cc",
237    "src/ops/populate/v0/concat_populate_v0.cc",
238    "src/ops/populate/v0/constant_of_shape_populate_v0.cc",
239    "src/ops/populate/v0/control/switch_populate_v0.cc",
240    "src/ops/populate/v0/control/tensorlistfromtensor_populate_v0.cc",
241    "src/ops/populate/v0/control/tensorlistgetitem_populate_v0.cc",
242    "src/ops/populate/v0/control/tensorlistreserve_populate_v0.cc",
243    "src/ops/populate/v0/control/tensorlistsetlitem_populate_v0.cc",
244    "src/ops/populate/v0/control/tensorliststack_populate_v0.cc",
245    "src/ops/populate/v0/conv2d_populate_v0.cc",
246    "src/ops/populate/v0/crop_populate_v0.cc",
247    "src/ops/populate/v0/deconv2d_populate_v0.cc",
248    "src/ops/populate/v0/dedepthwise_conv2d_populate_v0.cc",
249    "src/ops/populate/v0/depth_to_space_populate_v0.cc",
250    "src/ops/populate/v0/depthwise_conv2d_populate_v0.cc",
251    "src/ops/populate/v0/detection_post_process_populate_v0.cc",
252    "src/ops/populate/v0/div_populate_v0.cc",
253    "src/ops/populate/v0/eltwise_populate_v0.cc",
254    "src/ops/populate/v0/embedding_lookup_populate_v0.cc",
255    "src/ops/populate/v0/exp_populate_v0.cc",
256    "src/ops/populate/v0/expand_dims_populate_v0.cc",
257    "src/ops/populate/v0/fill_populate_v0.cc",
258    "src/ops/populate/v0/flatten_populate_v0.cc",
259    "src/ops/populate/v0/full_connection_populate_v0.cc",
260    "src/ops/populate/v0/fused_batchnorm_populate_v0.cc",
261    "src/ops/populate/v0/gather_nd_populate_v0.cc",
262    "src/ops/populate/v0/gather_populate_v0.cc",
263    "src/ops/populate/v0/gelu_populate_v0.cc",
264    "src/ops/populate/v0/instance_norm_populate_v0.cc",
265    "src/ops/populate/v0/l2_norm_populate_v0.cc",
266    "src/ops/populate/v0/layer_norm_populate_v0.cc",
267    "src/ops/populate/v0/local_response_normalization_populate_v0.cc",
268    "src/ops/populate/v0/lstm_populate_v0.cc",
269    "src/ops/populate/v0/matmul_populate_v0.cc",
270    "src/ops/populate/v0/mul_populate_v0.cc",
271    "src/ops/populate/v0/nchw2nhwc_populate_v0.cc",
272    "src/ops/populate/v0/nhwc2nchw_populate_v0.cc",
273    "src/ops/populate/v0/non_max_suppression_populate_v0.cc",
274    "src/ops/populate/v0/one_hot_populate_v0.cc",
275    "src/ops/populate/v0/oneslike_populate_v0.cc",
276    "src/ops/populate/v0/p_relu_populate_v0.cc",
277    "src/ops/populate/v0/pad_populate_v0.cc",
278    "src/ops/populate/v0/partial_populate_v0.cc",
279    "src/ops/populate/v0/pooling_populate_v0.cc",
280    "src/ops/populate/v0/power_populate_v0.cc",
281    "src/ops/populate/v0/prior_box_populate_v0.cc",
282    "src/ops/populate/v0/quant_dtype_cast_populate_v0.cc",
283    "src/ops/populate/v0/range_populate_v0.cc",
284    "src/ops/populate/v0/rank_populate_v0.cc",
285    "src/ops/populate/v0/reduce_populate_v0.cc",
286    "src/ops/populate/v0/reshape_populate_v0.cc",
287    "src/ops/populate/v0/resize_populate_v0.cc",
288    "src/ops/populate/v0/reverse_populate_v0.cc",
289    "src/ops/populate/v0/reverse_sequence_populate_v0.cc",
290    "src/ops/populate/v0/roi_pooling_populate_v0.cc",
291    "src/ops/populate/v0/scale_populate_v0.cc",
292    "src/ops/populate/v0/scatter_nd_populate_v0.cc",
293    "src/ops/populate/v0/shape_populate_v0.cc",
294    "src/ops/populate/v0/slice_populate_v0.cc",
295    "src/ops/populate/v0/softmax_populate_v0.cc",
296    "src/ops/populate/v0/space_to_batch_nd_populate_v0.cc",
297    "src/ops/populate/v0/space_to_batch_populate_v0.cc",
298    "src/ops/populate/v0/space_to_depth_populate_v0.cc",
299    "src/ops/populate/v0/sparse_to_dense_populate_v0.cc",
300    "src/ops/populate/v0/split_populate_v0.cc",
301    "src/ops/populate/v0/squared_difference_populate_v0.cc",
302    "src/ops/populate/v0/squeeze_populate_v0.cc",
303    "src/ops/populate/v0/stack_populate_v0.cc",
304    "src/ops/populate/v0/strided_slice_populate_v0.cc",
305    "src/ops/populate/v0/string/custom_extract_features_populate_v0.cc",
306    "src/ops/populate/v0/string/custom_normalize_populate_v0.cc",
307    "src/ops/populate/v0/string/custom_predict_populate_v0.cc",
308    "src/ops/populate/v0/string/hashtable_lookup_populate_v0.cc",
309    "src/ops/populate/v0/string/lsh_projection_populate_v0.cc",
310    "src/ops/populate/v0/string/skip_gram_populate_v0.cc",
311    "src/ops/populate/v0/sub_populate_v0.cc",
312    "src/ops/populate/v0/tile_populate_v0.cc",
313    "src/ops/populate/v0/topk_populate_v0.cc",
314    "src/ops/populate/v0/transpose_populate_v0.cc",
315    "src/ops/populate/v0/unique_populate_v0.cc",
316    "src/ops/populate/v0/unsorted_segment_sum_populate_v0.cc",
317    "src/ops/populate/v0/unsqueeze_populate_v0.cc",
318    "src/ops/populate/v0/unstack_populate_v0.cc",
319    "src/ops/populate/v0/where_populate_v0.cc",
320    "src/ops/populate/where_populate.cc",
321    "src/registry/kernel_interface_registry.cc",
322    "src/registry/register_kernel.cc",
323    "src/registry/register_kernel_impl.cc",
324    "src/registry/register_kernel_interface.cc",
325    "src/runtime/infer_manager.cc",
326    "src/runtime/inner_allocator.cc",
327    "src/runtime/kernel/arm/base/argminmax_base.cc",
328    "src/runtime/kernel/arm/base/assert.cc",
329    "src/runtime/kernel/arm/base/call.cc",
330    "src/runtime/kernel/arm/base/carry_data.cc",
331    "src/runtime/kernel/arm/base/constant_of_shape.cc",
332    "src/runtime/kernel/arm/base/convolution_base.cc",
333    "src/runtime/kernel/arm/base/crop_base.cc",
334    "src/runtime/kernel/arm/base/detection_post_process_base.cc",
335    "src/runtime/kernel/arm/base/group_convolution_base.cc",
336    "src/runtime/kernel/arm/base/group_convolution_creator.cc",
337    "src/runtime/kernel/arm/base/layout_transform.cc",
338    "src/runtime/kernel/arm/base/one_hot_base.cc",
339    "src/runtime/kernel/arm/base/partial_fusion.cc",
340    "src/runtime/kernel/arm/base/pooling_base.cc",
341    "src/runtime/kernel/arm/base/prior_box.cc",
342    "src/runtime/kernel/arm/base/quant_dtype_cast.cc",
343    "src/runtime/kernel/arm/base/random_standard_normal.cc",
344    "src/runtime/kernel/arm/base/reduce_base.cc",
345    "src/runtime/kernel/arm/base/reshape_base.cc",
346    "src/runtime/kernel/arm/base/resize_base.cc",
347    "src/runtime/kernel/arm/base/select.cc",
348    "src/runtime/kernel/arm/base/slice_base.cc",
349    "src/runtime/kernel/arm/base/softmax_base.cc",
350    "src/runtime/kernel/arm/base/split_base.cc",
351    "src/runtime/kernel/arm/base/split_with_over_lap_base.cc",
352    "src/runtime/kernel/arm/base/stack_base.cc",
353    "src/runtime/kernel/arm/base/strided_slice.cc",
354    "src/runtime/kernel/arm/base/tile_base.cc",
355    "src/runtime/kernel/arm/control/switch.cc",
356    "src/runtime/kernel/arm/control/tensor_array.cc",
357    "src/runtime/kernel/arm/control/tensorlist_fromtensor.cc",
358    "src/runtime/kernel/arm/control/tensorlist_getitem.cc",
359    "src/runtime/kernel/arm/control/tensorlist_reserve.cc",
360    "src/runtime/kernel/arm/control/tensorlist_setitem.cc",
361    "src/runtime/kernel/arm/control/tensorlist_stack.cc",
362    "src/runtime/kernel/arm/fp32/activation_fp32.cc",
363    "src/runtime/kernel/arm/fp32/adder_fp32.cc",
364    "src/runtime/kernel/arm/fp32/addn_fp32.cc",
365    "src/runtime/kernel/arm/fp32/affine_fp32.cc",
366    "src/runtime/kernel/arm/fp32/arithmetic_compare_fp32.cc",
367    "src/runtime/kernel/arm/fp32/arithmetic_fp32.cc",
368    "src/runtime/kernel/arm/fp32/arithmetic_self_fp32.cc",
369    "src/runtime/kernel/arm/fp32/batch_to_space_fp32.cc",
370    "src/runtime/kernel/arm/fp32/batchnorm_fp32.cc",
371    "src/runtime/kernel/arm/fp32/bias_fp32.cc",
372    "src/runtime/kernel/arm/fp32/broadcast_to_fp32.cc",
373    "src/runtime/kernel/arm/fp32/cast_fp32.cc",
374    "src/runtime/kernel/arm/fp32/concat_fp32.cc",
375    "src/runtime/kernel/arm/fp32/convolution_1x1_fp32.cc",
376    "src/runtime/kernel/arm/fp32/convolution_delegate_fp32.cc",
377    "src/runtime/kernel/arm/fp32/convolution_depthwise_3x3_fp32.cc",
378    "src/runtime/kernel/arm/fp32/convolution_depthwise_fp32.cc",
379    "src/runtime/kernel/arm/fp32/convolution_depthwise_indirect_fp32.cc",
380    "src/runtime/kernel/arm/fp32/convolution_depthwise_slidewindow_fp32.cc",
381    "src/runtime/kernel/arm/fp32/convolution_depthwise_slidewindow_x86_fp32.cc",
382    "src/runtime/kernel/arm/fp32/convolution_fp32.cc",
383    "src/runtime/kernel/arm/fp32/convolution_slidewindow_fp32.cc",
384    "src/runtime/kernel/arm/fp32/convolution_winograd_fp32.cc",
385    "src/runtime/kernel/arm/fp32/crop_and_resize_fp32.cc",
386    "src/runtime/kernel/arm/fp32/crop_fp32.cc",
387    "src/runtime/kernel/arm/fp32/cumsum_fp32.cc",
388    "src/runtime/kernel/arm/fp32/deconvolution_depthwise_fp32.cc",
389    "src/runtime/kernel/arm/fp32/deconvolution_fp32.cc",
390    "src/runtime/kernel/arm/fp32/deconvolution_winograd_fp32.cc",
391    "src/runtime/kernel/arm/fp32/depth_to_space_fp32.cc",
392    "src/runtime/kernel/arm/fp32/detection_post_process_fp32.cc",
393    "src/runtime/kernel/arm/fp32/embedding_lookup_fp32.cc",
394    "src/runtime/kernel/arm/fp32/exp_fp32.cc",
395    "src/runtime/kernel/arm/fp32/fill_fp32.cc",
396    "src/runtime/kernel/arm/fp32/fullconnection_fp32.cc",
397    "src/runtime/kernel/arm/fp32/fused_batchnorm_fp32.cc",
398    "src/runtime/kernel/arm/fp32/gatherNd_fp32.cc",
399    "src/runtime/kernel/arm/fp32/gather_fp32.cc",
400    "src/runtime/kernel/arm/fp32/glu_fp32.cc",
401    "src/runtime/kernel/arm/fp32/group_convolution_fp32.cc",
402    "src/runtime/kernel/arm/fp32/gru_fp32.cc",
403    "src/runtime/kernel/arm/fp32/instance_norm_fp32.cc",
404    "src/runtime/kernel/arm/fp32/invert_permutation_fp32.cc",
405    "src/runtime/kernel/arm/fp32/l2_norm_fp32.cc",
406    "src/runtime/kernel/arm/fp32/layer_norm_fp32.cc",
407    "src/runtime/kernel/arm/fp32/local_response_norm_fp32.cc",
408    "src/runtime/kernel/arm/fp32/log_softmax_fp32.cc",
409    "src/runtime/kernel/arm/fp32/lstm_fp32.cc",
410    "src/runtime/kernel/arm/fp32/matmul_fp32.cc",
411    "src/runtime/kernel/arm/fp32/matmul_fp32_base.cc",
412    "src/runtime/kernel/arm/fp32/non_max_suppression_fp32.cc",
413    "src/runtime/kernel/arm/fp32/nonzero_fp32.cc",
414    "src/runtime/kernel/arm/fp32/pad_fp32.cc",
415    "src/runtime/kernel/arm/fp32/pooling_fp32.cc",
416    "src/runtime/kernel/arm/fp32/power_fp32.cc",
417    "src/runtime/kernel/arm/fp32/prelu_fp32.cc",
418    "src/runtime/kernel/arm/fp32/ragged_range_fp32.cc",
419    "src/runtime/kernel/arm/fp32/range_fp32.cc",
420    "src/runtime/kernel/arm/fp32/rank_fp32.cc",
421    "src/runtime/kernel/arm/fp32/reduce_fp32.cc",
422    "src/runtime/kernel/arm/fp32/relative_position_attention_fp32.cc",
423    "src/runtime/kernel/arm/fp32/resize_fp32.cc",
424    "src/runtime/kernel/arm/fp32/reverse_fp32.cc",
425    "src/runtime/kernel/arm/fp32/reverse_sequence_fp32.cc",
426    "src/runtime/kernel/arm/fp32/roi_pooling_fp32.cc",
427    "src/runtime/kernel/arm/fp32/scale_fp32.cc",
428    "src/runtime/kernel/arm/fp32/scatter_nd_fp32.cc",
429    "src/runtime/kernel/arm/fp32/scatter_nd_update_fp32.cc",
430    "src/runtime/kernel/arm/fp32/shape_fp32.cc",
431    "src/runtime/kernel/arm/fp32/size_fp32.cc",
432    "src/runtime/kernel/arm/fp32/softmax_fp32.cc",
433    "src/runtime/kernel/arm/fp32/space_to_batch_fp32.cc",
434    "src/runtime/kernel/arm/fp32/space_to_depth_fp32.cc",
435    "src/runtime/kernel/arm/fp32/sparse_to_dense_fp32.cc",
436    "src/runtime/kernel/arm/fp32/splice_fp32.cc",
437    "src/runtime/kernel/arm/fp32/topk_fp32.cc",
438    "src/runtime/kernel/arm/fp32/transpose_fp32.cc",
439    "src/runtime/kernel/arm/fp32/uniform_real_fp32.cc",
440    "src/runtime/kernel/arm/fp32/unique_fp32.cc",
441    "src/runtime/kernel/arm/fp32/unstack_fp32.cc",
442    "src/runtime/kernel/arm/fp32/where_fp32.cc",
443    "src/runtime/kernel/arm/fp32/zeroslike_fp32.cc",
444    "src/runtime/kernel/arm/int8/activation_int8.cc",
445    "src/runtime/kernel/arm/int8/add_int8.cc",
446    "src/runtime/kernel/arm/int8/argminmax_int8.cc",
447    "src/runtime/kernel/arm/int8/arithmetic_int8.cc",
448    "src/runtime/kernel/arm/int8/arithmetic_self_int8.cc",
449    "src/runtime/kernel/arm/int8/batch_to_space_int8.cc",
450    "src/runtime/kernel/arm/int8/batchnorm_int8.cc",
451    "src/runtime/kernel/arm/int8/bias_add_int8.cc",
452    "src/runtime/kernel/arm/int8/concat_int8.cc",
453    "src/runtime/kernel/arm/int8/convolution_1x1_int8.cc",
454    "src/runtime/kernel/arm/int8/convolution_3x3_int8.cc",
455    "src/runtime/kernel/arm/int8/convolution_depthwise_3x3_int8.cc",
456    "src/runtime/kernel/arm/int8/convolution_depthwise_int8.cc",
457    "src/runtime/kernel/arm/int8/convolution_depthwise_slidewindow_int8.cc",
458    "src/runtime/kernel/arm/int8/convolution_int8.cc",
459    "src/runtime/kernel/arm/int8/convolution_int8_creator.cc",
460    "src/runtime/kernel/arm/int8/crop_int8.cc",
461    "src/runtime/kernel/arm/int8/deconvolution_depthwise_int8.cc",
462    "src/runtime/kernel/arm/int8/deconvolution_int8.cc",
463    "src/runtime/kernel/arm/int8/depth_to_space_int8.cc",
464    "src/runtime/kernel/arm/int8/detection_post_process_int8.cc",
465    "src/runtime/kernel/arm/int8/div_int8.cc",
466    "src/runtime/kernel/arm/int8/fullconnection_int8.cc",
467    "src/runtime/kernel/arm/int8/gatherNd_int8.cc",
468    "src/runtime/kernel/arm/int8/gather_int8.cc",
469    "src/runtime/kernel/arm/int8/group_convolution_int8.cc",
470    "src/runtime/kernel/arm/int8/hswish_int8.cc",
471    "src/runtime/kernel/arm/int8/l2_norm_int8.cc",
472    "src/runtime/kernel/arm/int8/layer_norm_int8.cc",
473    "src/runtime/kernel/arm/int8/leaky_relu_int8.cc",
474    "src/runtime/kernel/arm/int8/matmul_base_int8.cc",
475    "src/runtime/kernel/arm/int8/matmul_int8.cc",
476    "src/runtime/kernel/arm/int8/mul_int8.cc",
477    "src/runtime/kernel/arm/int8/opt_op_handler.cc",
478    "src/runtime/kernel/arm/int8/pad_int8.cc",
479    "src/runtime/kernel/arm/int8/pooling_int8.cc",
480    "src/runtime/kernel/arm/int8/power_int8.cc",
481    "src/runtime/kernel/arm/int8/reduce_int8.cc",
482    "src/runtime/kernel/arm/int8/relux_int8.cc",
483    "src/runtime/kernel/arm/int8/reshape_int8.cc",
484    "src/runtime/kernel/arm/int8/resize_int8.cc",
485    "src/runtime/kernel/arm/int8/scale_int8.cc",
486    "src/runtime/kernel/arm/int8/sigmoid_int8.cc",
487    "src/runtime/kernel/arm/int8/slice_int8.cc",
488    "src/runtime/kernel/arm/int8/softmax_int8.cc",
489    "src/runtime/kernel/arm/int8/space_to_batch_int8.cc",
490    "src/runtime/kernel/arm/int8/split_int8.cc",
491    "src/runtime/kernel/arm/int8/squeeze_int8.cc",
492    "src/runtime/kernel/arm/int8/sub_int8.cc",
493    "src/runtime/kernel/arm/int8/tanh_int8.cc",
494    "src/runtime/kernel/arm/int8/topk_int8.cc",
495    "src/runtime/kernel/arm/int8/transpose_int8.cc",
496    "src/runtime/kernel/arm/int8/unsqueeze_int8.cc",
497    "src/runtime/kernel/arm/string/extract_feature.cc",
498    "src/runtime/kernel/arm/string/hashtable_lookup.cc",
499    "src/runtime/kernel/arm/string/lsh_projection.cc",
500    "src/runtime/kernel/arm/string/normalize.cc",
501    "src/runtime/kernel/arm/string/predict.cc",
502    "src/runtime/kernel/arm/string/skip_gram.cc",
503    "src/runtime/runtime_pass.cc",
504    "src/scheduler.cc",
505    "src/sub_graph_kernel.cc",
506    "src/sub_graph_split.cc",
507    "src/tensor.cc",
508    "src/tensorlist.cc",
509    "src/weight_decoder.cc",
510    "tools/converter/quantizer/fse_bit_stream.cc",
511    "tools/converter/quantizer/fse_decoder.cc",
512  ]
513
514  sources = []
515  if (target_cpu == "arm64") {
516    arm64_sources = [
517      "src/runtime/kernel/arm/fp16/activation_fp16.cc",
518      "src/runtime/kernel/arm/fp16/addn_fp16.cc",
519      "src/runtime/kernel/arm/fp16/arithmetic_compare_fp16.cc",
520      "src/runtime/kernel/arm/fp16/arithmetic_fp16.cc",
521      "src/runtime/kernel/arm/fp16/arithmetic_self_fp16.cc",
522      "src/runtime/kernel/arm/fp16/batchnorm_fp16.cc",
523      "src/runtime/kernel/arm/fp16/biasadd_fp16.cc",
524      "src/runtime/kernel/arm/fp16/cast_fp16.cc",
525      "src/runtime/kernel/arm/fp16/common_fp16.cc",
526      "src/runtime/kernel/arm/fp16/concat_fp16.cc",
527      "src/runtime/kernel/arm/fp16/convolution_1x1_fp16.cc",
528      "src/runtime/kernel/arm/fp16/convolution_delegate_fp16.cc",
529      "src/runtime/kernel/arm/fp16/convolution_depthwise_3x3_fp16.cc",
530      "src/runtime/kernel/arm/fp16/convolution_depthwise_fp16.cc",
531      "src/runtime/kernel/arm/fp16/convolution_depthwise_slidewindow_fp16.cc",
532      "src/runtime/kernel/arm/fp16/convolution_fp16.cc",
533      "src/runtime/kernel/arm/fp16/convolution_winograd_fp16.cc",
534      "src/runtime/kernel/arm/fp16/crop_fp16.cc",
535      "src/runtime/kernel/arm/fp16/deconvolution_depthwise_fp16.cc",
536      "src/runtime/kernel/arm/fp16/deconvolution_fp16.cc",
537      "src/runtime/kernel/arm/fp16/deconvolution_winograd_fp16.cc",
538      "src/runtime/kernel/arm/fp16/depth_to_space_fp16.cc",
539      "src/runtime/kernel/arm/fp16/exp_fp16.cc",
540      "src/runtime/kernel/arm/fp16/fill_fp16.cc",
541      "src/runtime/kernel/arm/fp16/fullconnection_fp16.cc",
542      "src/runtime/kernel/arm/fp16/fused_batchnorm_fp16.cc",
543      "src/runtime/kernel/arm/fp16/gather_fp16.cc",
544      "src/runtime/kernel/arm/fp16/group_convolution_fp16.cc",
545      "src/runtime/kernel/arm/fp16/gru_fp16.cc",
546      "src/runtime/kernel/arm/fp16/instance_norm_fp16.cc",
547      "src/runtime/kernel/arm/fp16/layer_norm_fp16.cc",
548      "src/runtime/kernel/arm/fp16/layout_transform_fp16.cc",
549      "src/runtime/kernel/arm/fp16/log_softmax_fp16.cc",
550      "src/runtime/kernel/arm/fp16/lstm_fp16.cc",
551      "src/runtime/kernel/arm/fp16/matmul_base_fp16.cc",
552      "src/runtime/kernel/arm/fp16/matmul_fp16.cc",
553      "src/runtime/kernel/arm/fp16/pad_fp16.cc",
554      "src/runtime/kernel/arm/fp16/pooling_fp16.cc",
555      "src/runtime/kernel/arm/fp16/power_fp16.cc",
556      "src/runtime/kernel/arm/fp16/quant_dtype_cast_fp16.cc",
557      "src/runtime/kernel/arm/fp16/ragged_range_fp16.cc",
558      "src/runtime/kernel/arm/fp16/reduce_fp16.cc",
559      "src/runtime/kernel/arm/fp16/scale_fp16.cc",
560      "src/runtime/kernel/arm/fp16/slice_fp16.cc",
561      "src/runtime/kernel/arm/fp16/softmax_fp16.cc",
562      "src/runtime/kernel/arm/fp16/stack_fp16.cc",
563      "src/runtime/kernel/arm/fp16/transpose_fp16.cc",
564    ]
565    sources += arm64_sources
566  }
567  sources += common_sources
568  include_dirs = [
569    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
570    "//third_party/flatbuffers/include",
571    "./",
572    "../../",
573    "../../mindspore/core/",
574    "src",
575    "src/c_api/",
576    "../ccsrc/backend/kernel_compiler/cpu/",
577    "../../mindspore/core/mindrt/src/",
578    "../../mindspore/core/mindrt/include/",
579    "../../third_party/",
580  ]
581
582  defines = [
583    "ENABLE_MINDRT",
584    "MS_COMPILE_OHOS",
585    "ENABLE_V0",
586  ]
587
588  if (target_cpu == "arm") {
589    defines += [
590      "ENABLE_ARM",
591      "ENABLE_ARM32",
592      "ENABLE_NEON",
593    ]
594  } else if (target_cpu == "arm64") {
595    defines += [
596      "ENABLE_ARM",
597      "ENABLE_ARM64",
598      "ENABLE_NEON",
599      "ENABLE_FP16",
600      "USE_OPENCL_WRAPPER",
601      "MS_OPENCL_PROFILE=false",
602      "CL_TARGET_OPENCL_VERSION=200",
603      "CL_HPP_TARGET_OPENCL_VERSION=120",
604      "CL_HPP_MINIMUM_OPENCL_VERSION=120",
605    ]
606  }
607  disable_android = true
608  if (disable_android) {
609    cflags = [
610      "-UANDROID",
611      "-U__ANDROID__",
612      "-U__ANDROID_API__",
613    ]
614    cflags_cc = [
615      "-UANDROID",
616      "-U__ANDROID__",
617      "-U__ANDROID_API__",
618    ]
619  }
620  configs = [ ":opencl_option" ]
621  deps = [
622    "../ccsrc/backend/kernel_compiler/cpu/nnacl/:nnacl_o",
623    "../core/mindrt/:mindrt_o",
624  ]
625  external_deps = [ "hilog_native:libhilog" ]
626
627  output_name = "libmindspore-lite.huawei"
628  output_extension = "so"
629
630  public_configs = [ ":mindspore_api" ]
631  SUPPORT_NNRT = true
632  if (SUPPORT_NNRT) {
633    sources += [
634      "mindir/src/mindir_nnrt_lite_graph.cc",
635      "src/delegate/nnrt/checker/primitive_check.cc",
636      "src/delegate/nnrt/nnrt_delegate.cc",
637      "src/delegate/nnrt/nnrt_model_kernel.cc",
638    ]
639    include_dirs += [
640      "//foundation/ai/neural_network_runtime",
641      "src/delegate/nnrt/include",
642      "../../mindspore/core/ir",
643      "mindir/include",
644      "mindir/inner_headers",
645    ]
646    external_deps += [ "neural_network_runtime:nnrt_target" ]
647    deps += [ "mindir:mindir" ]
648    defines += [ "SUPPORT_NNRT" ]
649  }
650  part_name = "mindspore"
651}
652
653config("opencl_option") {
654  cflags_cc = [ "-Wno-missing-braces" ]
655}
656
657config("mindspore_api") {
658  include_dirs = [ "../../include/" ]
659}
660