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 1.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. LOCAL_PATH := $(call my-dir)
  2. COMMON_LOCAL_SRC_FILES := \
  3. dnnengines.cc \
  4. engine_manage.cc \
  5. COMMON_LOCAL_C_INCLUDES := \
  6. $(LOCAL_PATH) \
  7. $(LOCAL_PATH)/../ \
  8. $(LOCAL_PATH)/../../ \
  9. $(TOPDIR)inc \
  10. $(TOPDIR)metadef/inc \
  11. $(TOPDIR)graphengine/inc \
  12. $(TOPDIR)inc/external \
  13. $(TOPDIR)metadef/inc/external \
  14. $(TOPDIR)graphengine/inc/external \
  15. $(TOPDIR)graphengine/inc/framework \
  16. $(TOPDIR)graphengine/inc/framework/common \
  17. #compiler for host libengine
  18. include $(CLEAR_VARS)
  19. LOCAL_SHARED_LIBRARIES := \
  20. libslog
  21. LOCAL_MODULE := libengine
  22. LOCAL_CFLAGS += -Werror
  23. LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DREUSE_MEMORY=1
  24. ifeq ($(DEBUG), 1)
  25. LOCAL_CFLAGS += -g -O0
  26. endif
  27. LOCAL_C_INCLUDES := $(COMMON_LOCAL_C_INCLUDES)
  28. LOCAL_SRC_FILES := $(COMMON_LOCAL_SRC_FILES)
  29. LOCAL_LDFLAGS := -lrt -ldl
  30. include $(BUILD_HOST_SHARED_LIBRARY)
  31. #compiler for device libengine
  32. include $(CLEAR_VARS)
  33. LOCAL_SHARED_LIBRARIES := \
  34. libslog
  35. LOCAL_MODULE := libengine
  36. LOCAL_CFLAGS += -Werror
  37. LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DREUSE_MEMORY=1
  38. ifeq ($(DEBUG), 1)
  39. LOCAL_CFLAGS += -g -O0
  40. endif
  41. LOCAL_C_INCLUDES := $(COMMON_LOCAL_C_INCLUDES)
  42. LOCAL_SRC_FILES := $(COMMON_LOCAL_SRC_FILES)
  43. LOCAL_LDFLAGS := -lrt -ldl
  44. include $(BUILD_SHARED_LIBRARY)

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