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.

module.mk 4.6 kB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. LOCAL_PATH := $(call my-dir)
  2. local_lib_src_files := engine/ge_local_engine.cc \
  3. ops_kernel_store/ge_local_ops_kernel_info.cc \
  4. ops_kernel_store/op/op_factory.cc \
  5. ops_kernel_store/op/op.cc \
  6. ops_kernel_store/op/ge_deleted_op.cc \
  7. ops_kernel_store/op/no_op.cc \
  8. ops_kernel_builder_src_files := ops_kernel_store/ge_local_ops_kernel_builder.cc \
  9. ops_kernel_store/op/op_factory.cc \
  10. ops_kernel_store/op/op.cc \
  11. ops_kernel_store/op/ge_deleted_op.cc \
  12. ops_kernel_store/op/no_op.cc \
  13. local_lib_inc_path := proto/task.proto \
  14. ${LOCAL_PATH} \
  15. ${TOPDIR}inc \
  16. ${TOPDIR}inc/external \
  17. ${TOPDIR}inc/external/graph \
  18. $(TOPDIR)libc_sec/include \
  19. ${TOPDIR}third_party/protobuf/include \
  20. ${TOPDIR}inc/framework \
  21. $(TOPDIR)framework/domi \
  22. $(TOPDIR)graphengine/ge \
  23. #compiler for host
  24. include $(CLEAR_VARS)
  25. LOCAL_MODULE := libge_local_engine
  26. LOCAL_CFLAGS += -Werror
  27. LOCAL_CFLAGS += -std=c++11 -Dgoogle=ascend_private
  28. LOCAL_LDFLAGS :=
  29. LOCAL_STATIC_LIBRARIES :=
  30. LOCAL_SHARED_LIBRARIES := libascend_protobuf \
  31. libc_sec \
  32. libslog \
  33. libgraph \
  34. libregister \
  35. libruntime
  36. LOCAL_SRC_FILES := $(local_lib_src_files)
  37. LOCAL_C_INCLUDES := $(local_lib_inc_path)
  38. include ${BUILD_HOST_SHARED_LIBRARY}
  39. #compiler for atc
  40. include $(CLEAR_VARS)
  41. LOCAL_MODULE := atclib/libge_local_engine
  42. LOCAL_CFLAGS += -Werror
  43. LOCAL_CFLAGS += -std=c++11 -DCOMPILE_OMG_PACKAGE -Dgoogle=ascend_private
  44. LOCAL_LDFLAGS :=
  45. LOCAL_STATIC_LIBRARIES :=
  46. LOCAL_SHARED_LIBRARIES := libascend_protobuf \
  47. libc_sec \
  48. libslog \
  49. libgraph \
  50. libregister \
  51. libruntime_compile
  52. LOCAL_SRC_FILES := $(local_lib_src_files)
  53. LOCAL_C_INCLUDES := $(local_lib_inc_path)
  54. include ${BUILD_HOST_SHARED_LIBRARY}
  55. #compiler for libge_local_opskernel_builder.so
  56. include $(CLEAR_VARS)
  57. LOCAL_MODULE := libge_local_opskernel_builder
  58. LOCAL_CFLAGS += -Werror
  59. LOCAL_CFLAGS += -std=c++11 -Dgoogle=ascend_private
  60. LOCAL_LDFLAGS :=
  61. LOCAL_STATIC_LIBRARIES :=
  62. LOCAL_SHARED_LIBRARIES := libascend_protobuf \
  63. libc_sec \
  64. libslog \
  65. libregister \
  66. libgraph
  67. LOCAL_SRC_FILES := $(ops_kernel_builder_src_files)
  68. LOCAL_C_INCLUDES := $(local_lib_inc_path)
  69. include ${BUILD_HOST_SHARED_LIBRARY}
  70. #compiler for libge_local_opskernel_builder.so in atc
  71. include $(CLEAR_VARS)
  72. LOCAL_MODULE := atclib/libge_local_opskernel_builder
  73. LOCAL_CFLAGS += -Werror
  74. LOCAL_CFLAGS += -std=c++11 -Dgoogle=ascend_private
  75. LOCAL_LDFLAGS :=
  76. LOCAL_STATIC_LIBRARIES :=
  77. LOCAL_SHARED_LIBRARIES := libascend_protobuf \
  78. libc_sec \
  79. libslog \
  80. libregister \
  81. libgraph
  82. LOCAL_SRC_FILES := $(ops_kernel_builder_src_files)
  83. LOCAL_C_INCLUDES := $(local_lib_inc_path)
  84. include ${BUILD_HOST_SHARED_LIBRARY}
  85. #compiler for libge_local_opskernel_builder.a
  86. include $(CLEAR_VARS)
  87. LOCAL_MODULE := libge_local_opskernel_builder
  88. LOCAL_CFLAGS += -Werror
  89. LOCAL_CFLAGS += -std=c++11 -Dgoogle=ascend_private
  90. LOCAL_LDFLAGS :=
  91. LOCAL_STATIC_LIBRARIES := libascend_protobuf \
  92. libregister \
  93. libgraph \
  94. LOCAL_SHARED_LIBRARIES := libc_sec \
  95. libslog \
  96. LOCAL_SRC_FILES := $(ops_kernel_builder_src_files)
  97. LOCAL_C_INCLUDES := $(local_lib_inc_path)
  98. include ${BUILD_HOST_STATIC_LIBRARY}
  99. #compiler for device libge_local_opskernel_builder.a
  100. include $(CLEAR_VARS)
  101. LOCAL_MODULE := libge_local_opskernel_builder
  102. LOCAL_CFLAGS += -Werror
  103. LOCAL_CFLAGS += -std=c++11 -Dgoogle=ascend_private
  104. LOCAL_LDFLAGS :=
  105. LOCAL_STATIC_LIBRARIES := libascend_protobuf \
  106. libregister \
  107. libgraph \
  108. LOCAL_SHARED_LIBRARIES := libc_sec \
  109. libslog \
  110. LOCAL_SRC_FILES := $(ops_kernel_builder_src_files)
  111. LOCAL_C_INCLUDES := $(local_lib_inc_path)
  112. include ${BUILD_STATIC_LIBRARY}

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