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

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