diff --git a/build.sh b/build.sh index f0a997a7..1bc8007e 100644 --- a/build.sh +++ b/build.sh @@ -100,8 +100,8 @@ echo "---------------- GraphEngine build start ----------------" build_graphengine() { echo "create build directory and build GraphEngine"; - mk_dir "${BUILD_PATH}/graphengine" - cd "${BUILD_PATH}/graphengine" + mk_dir "${BUILD_PATH}" + cd "${BUILD_PATH}" CMAKE_ARGS="-DBUILD_PATH=$BUILD_PATH -DGE_ONLY=$GE_ONLY" if [[ "X$ENABLE_GE_COV" = "Xon" ]]; then @@ -117,18 +117,18 @@ build_graphengine() CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_GE_ST=ON" fi - CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_OPEN_SRC=True" + CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_OPEN_SRC=True -DCMAKE_INSTALL_PREFIX=${OUTPUT_PATH}" echo "${CMAKE_ARGS}" - cmake ${CMAKE_ARGS} ../.. - make ${VERBOSE} -j${THREAD_NUM} + cmake ${CMAKE_ARGS} .. + make ${VERBOSE} -j${THREAD_NUM} && make install echo "GraphEngine build success!" } g++ -v +mk_dir ${OUTPUT_PATH} build_graphengine echo "---------------- GraphEngine build finished ----------------" -mk_dir ${OUTPUT_PATH} -cp -rf "${BUILD_PATH}/graphengine/"*.so "${OUTPUT_PATH}" -rm -rf "${OUTPUT_PATH}/"libproto* +#cp -rf "${BUILD_PATH}/graphengine/"*.so "${OUTPUT_PATH}" +#rm -rf "${OUTPUT_PATH}/"libproto* rm -f ${OUTPUT_PATH}/libgmock*.so rm -f ${OUTPUT_PATH}/libgtest*.so rm -f ${OUTPUT_PATH}/lib*_stub.so @@ -176,43 +176,14 @@ echo "---------------- GraphEngine output generated ----------------" generate_package() { cd "${BASEPATH}" - FWK_PATH="fwkacllib/lib64" - ATC_PATH="atc/lib64" - NNENGINE_PATH="plugin/nnengine/ge_config" - OPSKERNEL_PATH="plugin/opskernel" - - ATC_LIB=("libc_sec.so" "libge_common.so" "libge_compiler.so" "libgraph.so") - FWK_LIB=("libge_common.so" "libge_runner.so" "libgraph.so") - rm -rf ${OUTPUT_PATH:?}/${FWK_PATH}/ - rm -rf ${OUTPUT_PATH:?}/${ATC_PATH}/ - mk_dir "${OUTPUT_PATH}/${FWK_PATH}/${NNENGINE_PATH}" - mk_dir "${OUTPUT_PATH}/${FWK_PATH}/${OPSKERNEL_PATH}" - mk_dir "${OUTPUT_PATH}/${ATC_PATH}/${NNENGINE_PATH}" - mk_dir "${OUTPUT_PATH}/${ATC_PATH}/${OPSKERNEL_PATH}" + GRAPHENGINE_LIB_PATH="lib" find output/ -name graphengine_lib.tar -exec rm {} \; - cp ge/engine_manager/engine_conf.json ${OUTPUT_PATH}/${FWK_PATH}/${NNENGINE_PATH} - cp ge/engine_manager/engine_conf.json ${OUTPUT_PATH}/${ATC_PATH}/${NNENGINE_PATH} - - find output/ -maxdepth 1 -name libengine.so -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH}/${NNENGINE_PATH}/../ \; - find output/ -maxdepth 1 -name libengine.so -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH}/${NNENGINE_PATH}/../ \; - - find output/ -maxdepth 1 -name libge_local_engine.so -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH}/${OPSKERNEL_PATH} \; - find output/ -maxdepth 1 -name libge_local_engine.so -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH}/${OPSKERNEL_PATH} \; cd "${OUTPUT_PATH}" - for lib in "${ATC_LIB[@]}"; - do - cp "$lib" "${OUTPUT_PATH}/${ATC_PATH}" - done - - for lib in "${FWK_LIB[@]}"; - do - cp "$lib" "${OUTPUT_PATH}/${FWK_PATH}" - done - - tar -cf graphengine_lib.tar fwkacllib/ atc/ + + tar -cf graphengine_lib.tar "${GRAPHENGINE_LIB_PATH}" } if [[ "X$ENABLE_GE_UT" = "Xoff" ]]; then diff --git a/cmake/external_libs/gflags.cmake b/cmake/external_libs/gflags.cmake index bed64400..022f0414 100755 --- a/cmake/external_libs/gflags.cmake +++ b/cmake/external_libs/gflags.cmake @@ -35,4 +35,5 @@ target_link_libraries(gflags INTERFACE gflags_static) add_dependencies(gflags gflags_build) -set(HAVE_GFLAGS TRUE CACHE BOOL "gflags build add") +#set(HAVE_GFLAGS TRUE CACHE BOOL "gflags build add") +set(HAVE_GFLAGS TRUE) diff --git a/cmake/external_libs/json.cmake b/cmake/external_libs/json.cmake index bb19d64e..9aa98b77 100755 --- a/cmake/external_libs/json.cmake +++ b/cmake/external_libs/json.cmake @@ -20,4 +20,5 @@ add_library(json INTERFACE) target_include_directories(json INTERFACE ${JSON_SRC_DIR}) add_dependencies(json json_build) -set(HAVE_JSON TRUE CACHE BOOL "json build add") +#set(HAVE_JSON TRUE CACHE BOOL "json build add") +set(HAVE_JSON TRUE) diff --git a/cmake/external_libs/protobuf_shared.cmake b/cmake/external_libs/protobuf_shared.cmake index fd2aa695..da16b498 100755 --- a/cmake/external_libs/protobuf_shared.cmake +++ b/cmake/external_libs/protobuf_shared.cmake @@ -55,4 +55,5 @@ install(FILES ${PROTOBUF_SHARED_PKG_DIR}/lib/libprotobuf.so ${PROTOBUF_SHARED_PK add_dependencies(protobuf protobuf_build) -set(HAVE_PROTOBUF TRUE CACHE BOOL "protobuf build add") +#set(HAVE_PROTOBUF TRUE CACHE BOOL "protobuf build add") +set(HAVE_PROTOBUF TRUE) diff --git a/cmake/external_libs/protoc.cmake b/cmake/external_libs/protoc.cmake index 4ea1bbec..33389667 100755 --- a/cmake/external_libs/protoc.cmake +++ b/cmake/external_libs/protoc.cmake @@ -99,4 +99,5 @@ function(protobuf_generate_py comp py_var) endfunction() -set(HAVE_PROTOC TRUE CACHE BOOL "protoc build add") +#set(HAVE_PROTOC TRUE CACHE BOOL "protoc build add") +set(HAVE_PROTOC TRUE) diff --git a/cmake/external_libs/securec.cmake b/cmake/external_libs/securec.cmake index 10ba5b22..0bd62ab2 100755 --- a/cmake/external_libs/securec.cmake +++ b/cmake/external_libs/securec.cmake @@ -14,7 +14,7 @@ ExternalProject_Add(c_sec_build URL https://gitee.com/openeuler/libboundscheck/repository/archive/v1.1.10.tar.gz #URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz #SOURCE_DIR ${GE_CODE_DIR}/../libc_sec - PATCH_COMMAND patch -p1 < ${METADEF_DIR}/third_party/patch/securec/0001-add-securec-cmake-script.patch + PATCH_COMMAND patch -p1 < ${GE_CODE_DIR}/metadef/third_party/patch/securec/0001-add-securec-cmake-script.patch CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} @@ -58,4 +58,5 @@ target_link_libraries(c_sec_static INTERFACE c_sec_static_lib) add_dependencies(c_sec_static c_sec_build) -set(HAVE_C_SEC TRUE CACHE BOOL "c_sec build add") +#set(HAVE_C_SEC TRUE CACHE BOOL "c_sec build add") +set(HAVE_C_SEC TRUE) diff --git a/cmake/intf_pub_linux.cmake b/cmake/intf_pub_linux.cmake index a98fee07..40c6bca9 100755 --- a/cmake/intf_pub_linux.cmake +++ b/cmake/intf_pub_linux.cmake @@ -29,4 +29,5 @@ target_link_libraries(intf_pub INTERFACE -lpthread ) -set(HAVE_PUB TRUE CACHE BOOL "pub add") +#set(HAVE_PUB TRUE CACHE BOOL "pub add") +set(HAVE_PUB TRUE) diff --git a/ge/CMakeLists.txt b/ge/CMakeLists.txt index d8093585..9793e36d 100755 --- a/ge/CMakeLists.txt +++ b/ge/CMakeLists.txt @@ -725,7 +725,7 @@ target_link_options(opensrc_ascendcl PRIVATE -Wl,--exclude-libs,ALL ) target_link_libraries(opensrc_ascendcl PRIVATE - -Wl, --whole-archive + -Wl,--whole-archive ge_executor ascendcl_static ge_common_static @@ -735,15 +735,15 @@ target_link_libraries(opensrc_ascendcl PRIVATE error_manager_static adump_server msprofiler - -Wl, --no-whole-archive - -Wl, --no-as-needed + -Wl,--no-whole-archive + -Wl,--no-as-needed c_sec runtime mmpa slog msprof ascend_hal_stub - -Wl, --as-needed + -Wl,--as-needed -ldl json ) diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index 062f3df3..cf258995 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -38,6 +38,7 @@ target_include_directories(atc PRIVATE ${GE_CODE_DIR}/inc/framework ${METADEF_DIR}/inc ${METADEF_DIR}/inc/external + ${PARSER_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/proto/ge ${GE_CODE_DIR}/third_party/fwkacllib/inc diff --git a/metadef b/metadef index 693e892f..c599dfd7 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 693e892fa66c5da9b8976d93e5418ded2614fc4f +Subproject commit c599dfd701ad1f7a7ef149faedcf2b5dec93fafb diff --git a/parser b/parser index 85cd977a..88eb8af4 160000 --- a/parser +++ b/parser @@ -1 +1 @@ -Subproject commit 85cd977a3089a848c1d3e83adccf33d6089f3910 +Subproject commit 88eb8af4ae95446773ba7cb444c04c3c41214327