Browse Source

update cmakelist

tags/v1.2.0
taoxiangdong 4 years ago
parent
commit
b1b30afd4e
2 changed files with 7 additions and 1 deletions
  1. +1
    -1
      CMakeLists.txt
  2. +6
    -0
      ge/CMakeLists.txt

+ 1
- 1
CMakeLists.txt View File

@@ -92,7 +92,7 @@ if (ENABLE_OPEN_SRC)
find_module(runtime libruntime.so ${ASCEND_RUNTIME_DIR}) find_module(runtime libruntime.so ${ASCEND_RUNTIME_DIR})
find_module(resource libresource.so ${ASCEND_RUNTIME_DIR}) find_module(resource libresource.so ${ASCEND_RUNTIME_DIR})
find_module(error_manager liberror_manager.so ${ASCEND_RUNTIME_DIR}) find_module(error_manager liberror_manager.so ${ASCEND_RUNTIME_DIR})
find_module(msprofiler_fwk libmsprofiler_fwk.a ${ASCEND_RUNTIME_DIR})
#find_module(msprofiler_fwk libmsprofiler_fwk.a ${ASCEND_RUNTIME_DIR})
find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver) find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver)
if(PRODUCT STREQUAL "flr3") if(PRODUCT STREQUAL "flr3")
message(FATAL_ERROR "This platform is not supported in train mode, build terminated") message(FATAL_ERROR "This platform is not supported in train mode, build terminated")


+ 6
- 0
ge/CMakeLists.txt View File

@@ -620,6 +620,12 @@ set(INFER_SRC_LIST
# add_library(msprofiler_fwk OBJECT ${msprof_file}) # add_library(msprofiler_fwk OBJECT ${msprof_file})
#endif() #endif()


if (ENABLE_OPEN_SRC)
add_library(msprofiler_fwk STATIC IMPORTED)
set_target_properties(msprofiler_fwk PROPERTIES
IMPORTED_LOCATION ${ASCEND_RUNTIME_DIR}/libmsprofiler_fwk.a)
endif()

if (NOT ENABLE_D AND NOT ENABLE_ACL AND NOT ENABLE_MS_TESTCASES) if (NOT ENABLE_D AND NOT ENABLE_ACL AND NOT ENABLE_MS_TESTCASES)
############ libge_runner.so ############ ############ libge_runner.so ############
add_library(ge_runner SHARED ${TRAIN_SRC_LIST} ${PROTO_SRCS} ${PROTO_CLIENT_SRCS} $<TARGET_OBJECTS:msprofiler_fwk>) add_library(ge_runner SHARED ${TRAIN_SRC_LIST} ${PROTO_SRCS} ${PROTO_CLIENT_SRCS} $<TARGET_OBJECTS:msprofiler_fwk>)


Loading…
Cancel
Save