You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ge_runner.mk 20 kB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. LOCAL_PATH := $(call my-dir)
  2. include $(LOCAL_PATH)/stub/Makefile
  3. LIBGE_LOCAL_SRC_FILES := \
  4. proto/fusion_model.proto \
  5. proto/optimizer_priority.proto \
  6. common/formats/format_transfers/datatype_transfer.cc \
  7. common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.cc \
  8. common/formats/format_transfers/format_transfer_dhwcn_fracz3D.cc \
  9. common/formats/format_transfers/format_transfer_dhwnc_fracz3D_transpose.cc \
  10. common/formats/format_transfers/format_transfer_fractal_nz.cc \
  11. common/formats/format_transfers/format_transfer_fractal_z.cc \
  12. common/formats/format_transfers/format_transfer_fractal_zz.cc \
  13. common/formats/format_transfers/format_transfer_fracz_hwcn.cc \
  14. common/formats/format_transfers/format_transfer_fracz_nchw.cc \
  15. common/formats/format_transfers/format_transfer_fracz_nhwc.cc \
  16. common/formats/format_transfers/format_transfer_hwcn_c1hwncoc0.cc \
  17. common/formats/format_transfers/format_transfer_nc1hwc0_nchw.cc \
  18. common/formats/format_transfers/format_transfer_nc1hwc0_nhwc.cc \
  19. common/formats/format_transfers/format_transfer_nchw_nc1hwc0.cc \
  20. common/formats/format_transfers/format_transfer_nhwc_nc1hwc0.cc \
  21. common/formats/format_transfers/format_transfer_transpose.cc \
  22. common/formats/formats.cc \
  23. common/formats/utils/formats_trans_utils.cc \
  24. common/fp16_t.cc \
  25. common/ge/plugin_manager.cc\
  26. common/ge/op_tiling_manager.cc\
  27. common/helper/model_cache_helper.cc \
  28. common/profiling/profiling_manager.cc \
  29. common/dump/dump_manager.cc \
  30. common/dump/dump_properties.cc \
  31. common/dump/dump_op.cc \
  32. common/profiling/ge_profiling.cc \
  33. common/profiling/ge_runner_profiling.cc \
  34. engine_manager/dnnengine_manager.cc \
  35. ge_local_engine/engine/host_cpu_engine.cc \
  36. generator/ge_generator.cc \
  37. generator/generator_api.cc \
  38. graph/build/graph_builder.cc \
  39. graph/build/label_allocator.cc \
  40. graph/build/logical_stream_allocator.cc \
  41. graph/build/model_builder.cc \
  42. graph/build/run_context.cc \
  43. graph/build/stream_allocator.cc \
  44. graph/build/stream_graph_optimizer.cc \
  45. graph/build/task_generator.cc \
  46. graph/common/bcast.cc \
  47. graph/common/local_context.cc \
  48. graph/common/omg_util.cc \
  49. graph/common/transop_util.cc \
  50. graph/execute/graph_execute.cc \
  51. graph/label/case_label_maker.cc \
  52. graph/label/if_label_maker.cc \
  53. graph/label/label_maker.cc \
  54. graph/label/partitioned_call_label_maker.cc \
  55. graph/label/while_label_maker.cc \
  56. graph/load/graph_loader.cc \
  57. graph/load/new_model_manager/cpu_queue_schedule.cc \
  58. graph/load/new_model_manager/data_dumper.cc \
  59. graph/load/new_model_manager/data_inputer.cc \
  60. graph/load/new_model_manager/davinci_model.cc \
  61. graph/load/new_model_manager/davinci_model_parser.cc \
  62. graph/load/new_model_manager/model_manager.cc \
  63. graph/load/new_model_manager/model_utils.cc \
  64. graph/load/new_model_manager/aipp_utils.cc \
  65. graph/load/new_model_manager/task_info/end_graph_task_info.cc \
  66. graph/load/new_model_manager/task_info/model_exit_task_info.cc \
  67. graph/load/new_model_manager/task_info/event_record_task_info.cc \
  68. graph/load/new_model_manager/task_info/event_wait_task_info.cc \
  69. graph/load/new_model_manager/task_info/fusion_start_task_info.cc \
  70. graph/load/new_model_manager/task_info/fusion_stop_task_info.cc \
  71. graph/load/new_model_manager/task_info/hccl_task_info.cc \
  72. graph/load/new_model_manager/task_info/kernel_ex_task_info.cc \
  73. graph/load/new_model_manager/task_info/kernel_task_info.cc \
  74. graph/load/new_model_manager/task_info/label_set_task_info.cc \
  75. graph/load/new_model_manager/task_info/label_switch_by_index_task_info.cc \
  76. graph/load/new_model_manager/task_info/label_goto_ex_task_info.cc \
  77. graph/load/new_model_manager/task_info/memcpy_addr_async_task_info.cc \
  78. graph/load/new_model_manager/task_info/memcpy_async_task_info.cc \
  79. graph/load/new_model_manager/task_info/profiler_trace_task_info.cc \
  80. graph/load/new_model_manager/task_info/stream_active_task_info.cc \
  81. graph/load/new_model_manager/task_info/stream_switch_task_info.cc \
  82. graph/load/new_model_manager/task_info/stream_switchn_task_info.cc \
  83. graph/load/new_model_manager/task_info/super_kernel/super_kernel.cc \
  84. graph/load/new_model_manager/task_info/super_kernel/super_kernel_factory.cc \
  85. graph/load/new_model_manager/task_info/task_info.cc \
  86. graph/load/new_model_manager/tbe_handle_store.cc \
  87. graph/load/new_model_manager/zero_copy_task.cc \
  88. graph/load/new_model_manager/zero_copy_offset.cc \
  89. graph/manager/graph_context.cc \
  90. graph/manager/graph_manager.cc \
  91. graph/manager/graph_manager_utils.cc \
  92. graph/manager/graph_mem_allocator.cc \
  93. graph/manager/graph_caching_allocator.cc \
  94. graph/manager/graph_var_manager.cc \
  95. graph/manager/host_mem_manager.cc \
  96. graph/manager/rdma_pool_allocator.cc \
  97. graph/manager/memory_api.cc \
  98. graph/manager/model_manager/event_manager.cc \
  99. graph/manager/trans_var_data_utils.cc \
  100. graph/manager/util/debug.cc \
  101. graph/manager/util/hcom_util.cc \
  102. graph/manager/util/rt_context_util.cc \
  103. graph/manager/util/variable_accelerate_ctrl.cc \
  104. graph/optimize/graph_optimize.cc \
  105. graph/optimize/mem_rw_conflict_optimize.cc \
  106. graph/optimize/summary_optimize.cc \
  107. graph/partition/engine_place.cc \
  108. graph/partition/graph_partition.cc \
  109. graph/passes/addn_pass.cc \
  110. graph/passes/aicpu_constant_folding_pass.cc \
  111. graph/passes/assert_pass.cc \
  112. graph/passes/input_output_connection_identify_pass.cc \
  113. graph/passes/atomic_addr_clean_pass.cc \
  114. graph/passes/mark_same_addr_pass.cc \
  115. graph/passes/mark_graph_unknown_status_pass.cc \
  116. graph/passes/dynamic_single_op_reset_shape_pass.cc \
  117. graph/passes/mark_agnostic_pass.cc \
  118. graph/partition/dynamic_shape_partition.cc \
  119. graph/partition/stage_partition.cc \
  120. graph/passes/base_pass.cc \
  121. graph/passes/bitcast_pass.cc \
  122. graph/passes/cast_remove_pass.cc \
  123. graph/passes/cast_translate_pass.cc \
  124. graph/passes/common_subexpression_elimination_pass.cc \
  125. graph/passes/transop_symmetry_elimination_pass.cc \
  126. graph/passes/compile_nodes_pass.cc \
  127. graph/passes/constant_folding_pass.cc \
  128. graph/passes/constant_fuse_same_pass.cc \
  129. graph/passes/remove_same_const_pass.cc \
  130. graph/passes/useless_control_out_remove_pass.cc \
  131. graph/passes/control_trigger_pass.cc \
  132. graph/passes/dimension_adjust_pass.cc \
  133. graph/passes/dimension_compute_pass.cc \
  134. graph/passes/dropout_pass.cc \
  135. graph/passes/hccl_group_pass.cc \
  136. graph/passes/enter_pass.cc \
  137. graph/passes/assign_pass.cc \
  138. graph/passes/flow_ctrl_pass.cc \
  139. graph/passes/global_step_insert_pass.cc \
  140. host_kernels/transpose_kernel.cc \
  141. host_kernels/add_kernel.cc \
  142. host_kernels/broadcast_args_kernel.cc \
  143. host_kernels/broadcast_gradient_args_kernel.cc \
  144. host_kernels/cast_kernel.cc \
  145. host_kernels/concat_offset_kernel.cc \
  146. host_kernels/concat_v2_kernel.cc \
  147. host_kernels/dynamic_stitch_kernel.cc \
  148. host_kernels/identity_kernel.cc \
  149. host_kernels/empty_kernel.cc \
  150. host_kernels/expanddims_kernel.cc \
  151. host_kernels/fill_kernel.cc \
  152. host_kernels/floordiv_kernel.cc \
  153. host_kernels/floormod_kernel.cc \
  154. host_kernels/gather_v2_kernel.cc \
  155. host_kernels/greater_kernel.cc \
  156. host_kernels/kernel_utils.cc \
  157. host_kernels/maximum_kernel.cc \
  158. host_kernels/mul_kernel.cc \
  159. host_kernels/pack_kernel.cc \
  160. host_kernels/permute_kernel.cc \
  161. host_kernels/range_kernel.cc \
  162. host_kernels/rank_kernel.cc \
  163. host_kernels/reduce_prod_kernel.cc \
  164. host_kernels/reshape_kernel.cc \
  165. host_kernels/rsqrt_kernel.cc \
  166. host_kernels/shape_kernel.cc \
  167. host_kernels/shape_n_kernel.cc \
  168. host_kernels/size_kernel.cc \
  169. host_kernels/slice_d_kernel.cc \
  170. host_kernels/slice_kernel.cc \
  171. host_kernels/squeeze_kernel.cc \
  172. host_kernels/unsqueeze_kernel.cc \
  173. host_kernels/ssd_prior_box_kernel.cc \
  174. host_kernels/strided_slice_kernel.cc \
  175. host_kernels/sub_kernel.cc \
  176. host_kernels/transdata_kernel.cc \
  177. host_kernels/unpack_kernel.cc \
  178. host_kernels/reformat_kernel.cc \
  179. graph/passes/folding_pass.cc \
  180. graph/passes/get_original_format_pass.cc \
  181. graph/passes/guarantee_const_pass.cc \
  182. graph/passes/hccl_memcpy_pass.cc \
  183. graph/passes/identity_pass.cc \
  184. graph/passes/ref_identity_delete_op_pass.cc \
  185. graph/passes/infershape_pass.cc \
  186. graph/passes/isolated_op_remove_pass.cc \
  187. graph/passes/iterator_op_pass.cc \
  188. graph/passes/link_gen_mask_nodes_pass.cc \
  189. graph/passes/merge_pass.cc \
  190. graph/passes/multi_batch_pass.cc \
  191. graph/passes/multi_batch_clone_pass.cc \
  192. graph/passes/subexpression_migration_pass.cc \
  193. graph/passes/subgraph_const_migration_pass.cc \
  194. graph/passes/unused_args_clean_pass.cc \
  195. graph/passes/net_output_pass.cc \
  196. graph/passes/next_iteration_pass.cc \
  197. graph/passes/no_use_reshape_remove_pass.cc \
  198. graph/passes/pass_manager.cc \
  199. graph/passes/pass_utils.cc \
  200. graph/passes/permute_pass.cc \
  201. graph/passes/placeholder_with_default_pass.cc \
  202. graph/passes/prevent_gradient_pass.cc \
  203. graph/passes/print_op_pass.cc \
  204. graph/passes/prune_pass.cc \
  205. graph/passes/ctrl_edge_transfer_pass.cc \
  206. graph/passes/replace_with_empty_const_pass.cc \
  207. graph/passes/reshape_remove_pass.cc \
  208. graph/passes/reshape_recovery_pass.cc \
  209. graph/passes/resource_pair_add_control_pass.cc \
  210. graph/passes/resource_pair_remove_control_pass.cc \
  211. graph/passes/same_transdata_breadth_fusion_pass.cc \
  212. graph/passes/save_pass.cc \
  213. graph/passes/shape_operate_op_remove_pass.cc \
  214. graph/passes/snapshot_pass.cc \
  215. graph/passes/stop_gradient_pass.cc \
  216. graph/passes/subgraph_pass.cc \
  217. graph/passes/data_pass.cc \
  218. graph/passes/switch_data_edges_bypass.cc \
  219. graph/passes/switch_logic_remove_pass.cc \
  220. graph/passes/merge_to_stream_merge_pass.cc \
  221. graph/passes/merge_input_memcpy_pass.cc \
  222. graph/passes/switch_to_stream_switch_pass.cc \
  223. graph/passes/attach_stream_label_pass.cc \
  224. graph/passes/switch_dead_branch_elimination.cc \
  225. graph/passes/replace_transshape_pass.cc \
  226. graph/passes/transop_breadth_fusion_pass.cc \
  227. graph/passes/transop_depth_fusion_pass.cc \
  228. graph/passes/transop_nearby_allreduce_fusion_pass.cc \
  229. graph/passes/transop_without_reshape_fusion_pass.cc \
  230. graph/passes/transpose_transdata_pass.cc \
  231. graph/passes/unused_const_pass.cc \
  232. graph/passes/unused_op_remove_pass.cc \
  233. graph/passes/var_is_initialized_op_pass.cc \
  234. graph/passes/parallel_concat_start_op_pass.cc \
  235. graph/passes/cond_pass.cc \
  236. graph/passes/cond_remove_pass.cc \
  237. graph/passes/for_pass.cc \
  238. graph/passes/variable_format_pass.cc \
  239. graph/passes/variable_op_pass.cc \
  240. graph/passes/variable_prepare_op_pass.cc \
  241. graph/passes/variable_ref_delete_op_pass.cc \
  242. graph/passes/variable_ref_useless_control_out_delete_pass.cc \
  243. graph/passes/end_of_sequence_add_control_pass.cc \
  244. graph/passes/memcpy_addr_async_pass.cc \
  245. graph/passes/set_input_output_offset_pass.cc \
  246. graph/preprocess/graph_preprocess.cc \
  247. graph/preprocess/insert_op/ge_aipp_op.cc \
  248. graph/preprocess/insert_op/util_insert_aipp_op.cc \
  249. graph/preprocess/multi_batch_options.cc \
  250. graph/preprocess/multi_batch_copy_graph.cc \
  251. init/gelib.cc \
  252. model/ge_model.cc \
  253. model/ge_root_model.cc \
  254. omm/csa_interact.cc \
  255. opskernel_manager/ops_kernel_manager.cc \
  256. opskernel_manager/ops_kernel_builder_manager.cc \
  257. session/inner_session.cc \
  258. session/session_manager.cc \
  259. single_op/single_op.cc \
  260. single_op/single_op_manager.cc \
  261. single_op/single_op_model.cc \
  262. single_op/stream_resource.cc \
  263. single_op/task/build_task_utils.cc \
  264. single_op/task/op_task.cc \
  265. single_op/task/tbe_task_builder.cc \
  266. single_op/task/aicpu_task_builder.cc \
  267. single_op/task/aicpu_kernel_task_builder.cc \
  268. hybrid/common/tensor_value.cc \
  269. hybrid/common/npu_memory_allocator.cc \
  270. hybrid/executor/rt_callback_manager.cc \
  271. hybrid/executor/node_state.cc \
  272. hybrid/executor/node_done_manager.cc \
  273. hybrid/executor/hybrid_profiler.cc \
  274. hybrid/executor/hybrid_model_executor.cc \
  275. hybrid/executor/hybrid_model_async_executor.cc \
  276. hybrid/executor/hybrid_execution_context.cc \
  277. hybrid/executor/subgraph_context.cc \
  278. hybrid/executor/subgraph_executor.cc \
  279. hybrid/executor/worker/task_compile_engine.cc \
  280. hybrid/executor/worker/shape_inference_engine.cc \
  281. hybrid/executor/worker/execution_engine.cc \
  282. hybrid/model/hybrid_model.cc \
  283. hybrid/model/hybrid_model_builder.cc \
  284. hybrid/model/node_item.cc \
  285. hybrid/model/graph_item.cc \
  286. hybrid/node_executor/aicore/aicore_node_executor.cc \
  287. hybrid/node_executor/aicore/aicore_op_task.cc \
  288. hybrid/node_executor/aicore/aicore_task_builder.cc \
  289. hybrid/node_executor/aicore/aicore_task_compiler.cc \
  290. hybrid/node_executor/aicpu/aicpu_ext_info.cc \
  291. hybrid/node_executor/aicpu/aicpu_node_executor.cc \
  292. hybrid/node_executor/compiledsubgraph/known_node_executor.cc \
  293. hybrid/node_executor/ge_local/ge_local_node_executor.cc \
  294. hybrid/node_executor/host_cpu/host_cpu_node_executor.cc \
  295. hybrid/node_executor/host_cpu/kernel_factory.cc \
  296. hybrid/node_executor/host_cpu/kernel/no_op_kernel.cc \
  297. hybrid/node_executor/host_cpu/kernel/variable_kernel.cc \
  298. hybrid/node_executor/host_cpu/kernel/assign_kernel.cc \
  299. hybrid/node_executor/host_cpu/kernel/random_uniform_kernel.cc \
  300. hybrid/node_executor/controlop/control_op_executor.cc \
  301. hybrid/node_executor/partitioned_call/partitioned_call_node_executor.cc \
  302. hybrid/node_executor/hccl/hccl_node_executor.cc \
  303. hybrid/node_executor/rts/rts_node_executor.cc \
  304. hybrid/node_executor/node_executor.cc \
  305. hybrid/node_executor/task_context.cc \
  306. hybrid/hybrid_davinci_model.cc \
  307. executor/ge_executor.cc \
  308. analyzer/analyzer.cc \
  309. ir_build/ge_ir_build.cc \
  310. ir_build/atc_ir_common.cc \
  311. LIBCLIENT_LOCAL_SRC_FILES := \
  312. proto/ge_api.proto \
  313. client/ge_api.cc \
  314. RUNNER_LOCAL_C_INCLUDES := \
  315. $(LOCAL_PATH) ./ \
  316. $(LOCAL_PATH)/../ \
  317. $(LOCAL_PATH)/../../ \
  318. $(TOPDIR)inc \
  319. $(TOPDIR)metadef/inc \
  320. $(TOPDIR)graphengine/inc \
  321. $(TOPDIR)metadef/inc/common \
  322. $(TOPDIR)inc/external \
  323. $(TOPDIR)metadef/inc/external \
  324. $(TOPDIR)graphengine/inc/external \
  325. $(TOPDIR)metadef/inc/external/graph \
  326. $(TOPDIR)graphengine/inc/external/ge \
  327. $(TOPDIR)graphengine/inc/framework \
  328. $(TOPDIR)graphengine/inc/framework/common \
  329. $(TOPDIR)metadef/inc/graph \
  330. $(TOPDIR)inc/runtime \
  331. $(TOPDIR)libc_sec/include \
  332. $(TOPDIR)ops/built-in/op_proto/inc \
  333. $(TOPDIR)graphengine/ge/analyzer \
  334. $(TOPDIR)toolchain/ide/ide-daemon/external \
  335. proto/fwk_adapter.proto \
  336. proto/ge_ir.proto \
  337. proto/insert_op.proto \
  338. proto/om.proto \
  339. proto/op_mapping_info.proto \
  340. proto/dump_task.proto \
  341. proto/task.proto \
  342. proto/tensorflow/attr_value.proto \
  343. proto/tensorflow/function.proto \
  344. proto/tensorflow/graph.proto \
  345. proto/tensorflow/node_def.proto \
  346. proto/tensorflow/op_def.proto \
  347. proto/tensorflow/resource_handle.proto \
  348. proto/tensorflow/tensor.proto \
  349. proto/tensorflow/tensor_shape.proto \
  350. proto/tensorflow/types.proto \
  351. proto/tensorflow/versions.proto \
  352. third_party/json/include \
  353. third_party/opencv/include \
  354. third_party/protobuf/include \
  355. #compiler for GeRunner
  356. include $(CLEAR_VARS)
  357. LOCAL_MODULE := libge_runner
  358. LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DREUSE_MEMORY=1 -O2
  359. LOCAL_CFLAGS += -DFMK_SUPPORT_DUMP -DDAVINCI_SUPPORT_PROFILING -DDAVINCI_CLOUD -Dgoogle=ascend_private
  360. ifeq ($(DEBUG), 1)
  361. LOCAL_CFLAGS += -g -O0
  362. endif
  363. LOCAL_C_INCLUDES := $(RUNNER_LOCAL_C_INCLUDES)
  364. LOCAL_SRC_FILES := $(LIBGE_LOCAL_SRC_FILES)
  365. LOCAL_SRC_FILES += $(LIBCLIENT_LOCAL_SRC_FILES)
  366. LOCAL_STATIC_LIBRARIES := libge_memory \
  367. libadump_server \
  368. libmsprofiler_fwk \
  369. libmmpa \
  370. LOCAL_SHARED_LIBRARIES := \
  371. libc_sec \
  372. libascend_protobuf \
  373. libslog \
  374. libgraph \
  375. libregister \
  376. libge_common \
  377. liberror_manager \
  378. LOCAL_LDFLAGS := -lrt -ldl
  379. LOCAL_SHARED_LIBRARIES += \
  380. libruntime \
  381. libresource \
  382. stub/libascend_hal \
  383. include $(BUILD_HOST_SHARED_LIBRARY)
  384. #compiler for GeRunner
  385. include $(CLEAR_VARS)
  386. LOCAL_MODULE := stub/libge_runner
  387. LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DREUSE_MEMORY=1 -O2
  388. LOCAL_CFLAGS += -DFMK_SUPPORT_DUMP -DDAVINCI_SUPPORT_PROFILING -DDAVINCI_CLOUD
  389. ifeq ($(DEBUG), 1)
  390. LOCAL_CFLAGS += -g -O0
  391. endif
  392. LOCAL_C_INCLUDES := $(RUNNER_LOCAL_C_INCLUDES)
  393. LOCAL_SRC_FILES := ../../out/ge/lib64/stub/ge_api.cc \
  394. ../../out/ge/lib64/stub/ge_ir_build.cc \
  395. LOCAL_SHARED_LIBRARIES :=
  396. LOCAL_LDFLAGS := -lrt -ldl
  397. include $(BUILD_HOST_SHARED_LIBRARY)
  398. # add engine_conf.json to host
  399. include $(CLEAR_VARS)
  400. LOCAL_MODULE := engine_conf.json
  401. LOCAL_SRC_FILES := engine_manager/engine_conf.json
  402. LOCAL_MODULE_CLASS := ETC
  403. LOCAL_INSTALLED_PATH := $(HOST_OUT_ROOT)/engine_conf.json
  404. include $(BUILD_HOST_PREBUILT)
  405. # add optimizer_priority.pbtxt to host
  406. include $(CLEAR_VARS)
  407. LOCAL_MODULE := optimizer_priority.pbtxt
  408. LOCAL_SRC_FILES := opskernel_manager/optimizer_priority.pbtxt
  409. LOCAL_MODULE_CLASS := ETC
  410. LOCAL_INSTALLED_PATH := $(HOST_OUT_ROOT)/optimizer_priority.pbtxt
  411. include $(BUILD_HOST_PREBUILT)
  412. #compiler for GeRunner static lib
  413. include $(CLEAR_VARS)
  414. LOCAL_MODULE := libge_runner
  415. LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DREUSE_MEMORY=1 -O2
  416. LOCAL_CFLAGS += -DFMK_SUPPORT_DUMP -DDAVINCI_SUPPORT_PROFILING -DDAVINCI_CLOUD
  417. LOCAL_CFLAGS += -g -O0
  418. LOCAL_C_INCLUDES := $(RUNNER_LOCAL_C_INCLUDES)
  419. LOCAL_SRC_FILES := $(LIBGE_LOCAL_SRC_FILES)
  420. LOCAL_SRC_FILES += $(LIBCLIENT_LOCAL_SRC_FILES)
  421. LOCAL_STATIC_LIBRARIES := libge_memory \
  422. libadump_server \
  423. LOCAL_SHARED_LIBRARIES := \
  424. libc_sec \
  425. libslog \
  426. libmmpa \
  427. LOCAL_LDFLAGS := -lrt -ldl
  428. LOCAL_SHARED_LIBRARIES += \
  429. libruntime \
  430. libresource \
  431. stub/libascend_hal \
  432. include $(BUILD_HOST_STATIC_LIBRARY)
  433. #compiler for GeRunner static lib device
  434. include $(CLEAR_VARS)
  435. LOCAL_MODULE := libge_runner
  436. LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DREUSE_MEMORY=1 -O2
  437. LOCAL_CFLAGS += -DFMK_SUPPORT_DUMP -DDAVINCI_SUPPORT_PROFILING -DDAVINCI_CLOUD
  438. LOCAL_CFLAGS += -g -O0
  439. LOCAL_C_INCLUDES := $(RUNNER_LOCAL_C_INCLUDES)
  440. LOCAL_SRC_FILES := $(LIBGE_LOCAL_SRC_FILES)
  441. LOCAL_SRC_FILES += $(LIBCLIENT_LOCAL_SRC_FILES)
  442. LOCAL_STATIC_LIBRARIES := libge_memory \
  443. libadump_server \
  444. LOCAL_SHARED_LIBRARIES := \
  445. libc_sec \
  446. libslog \
  447. libmmpa \
  448. LOCAL_LDFLAGS := -lrt -ldl
  449. LOCAL_SHARED_LIBRARIES += \
  450. libruntime \
  451. libresource \
  452. libascend_hal \
  453. include $(BUILD_STATIC_LIBRARY)

图引擎模块(GE)是MindSpore的一个子模块,其代码由C++实现,位于前端模块ME和底层硬件之间,起到承接作用。图引擎模块以ME下发的图作为输入,然后进行一系列的深度图优化操作,最后输出一张可以在底层硬件上高效运行的图。GE针对昇腾AI处理器的硬件结构特点,做了特定的优化工作,以此来充分发挥出昇腾AI处理器的强大算力。在进行模型训练/推理时,GE会被自动调用而用户并不感知。GE主要由GE API和GE Core两部分组成,详细的架构图如下所示