From 1b861aab68fff18e83336abdfbec7f1f5ee222b1 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Tue, 20 Oct 2020 09:41:12 +0800 Subject: [PATCH 1/4] update cmake --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68a7e07..43da689 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,6 @@ if (ENABLE_OPEN_SRC) set(GE_LIB_PATH ${GE_LIB_PATH}/${GE_SYS_ARCH}) find_module(slog libslog.so ${GE_LIB_PATH}) find_module(mmpa libmmpa.so ${GE_LIB_PATH}) - find_module(ge_common libge_common.so ${GE_LIB_PATH}) find_module(error_manager liberror_manager.so ${GE_LIB_PATH}) else() if(DEFINED ENV{ASCEND_CUSTOM_PATH}) @@ -45,16 +44,13 @@ if (ENABLE_OPEN_SRC) find_module(slog libslog.so ${ASCEND_DRIVER_DIR}) find_module(mmpa libmmpa.so ${ASCEND_DRIVER_DIR}) - find_module(ge_common libge_common.so ${ASCEND_RUNTIME_DIR}) find_module(error_manager liberror_manager.so ${ASCEND_RUNTIME_DIR}) endif() if (NOT DEFINED METADEF_DIR) set(METADEF_DIR ${CMAKE_CURRENT_LIST_DIR}/metadef) + add_subdirectory(metadef) endif() - - add_subdirectory(metadef) - else() ####工程tigong From e16e2eec24e84df7c6f609722a8292f6b3d6aca7 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Tue, 20 Oct 2020 12:40:42 +0800 Subject: [PATCH 2/4] update include folder location --- parser/CMakeLists.txt | 8 ++++---- parser/common/CMakeLists.txt | 8 ++++---- parser/onnx/CMakeLists.txt | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt index 79976bf..eaa2361 100644 --- a/parser/CMakeLists.txt +++ b/parser/CMakeLists.txt @@ -72,10 +72,10 @@ target_include_directories(fmk_parser PRIVATE ${METADEF_DIR}/inc/external/graph ${METADEF_DIR}/inc/external/register #### independent compile ##### - ${METADEF_DIR}/third_party/ge - ${METADEF_DIR}/third_party/ge/inc - ${METADEF_DIR}/third_party/ge/inc/framework - ${METADEF_DIR}/third_party/ge/inc/external + ${METADEF_DIR}/third_party/graphengine/ge + ${METADEF_DIR}/third_party/graphengine/ge/inc + ${METADEF_DIR}/third_party/graphengine/inc/framework + ${METADEF_DIR}/third_party/graphengine/inc/external ${METADEF_DIR}/third_party/fwkacllib/inc #### temp #### ${PARSER_DIR}/../graphengine/inc/common/util diff --git a/parser/common/CMakeLists.txt b/parser/common/CMakeLists.txt index 8469c87..9c3be13 100644 --- a/parser/common/CMakeLists.txt +++ b/parser/common/CMakeLists.txt @@ -54,10 +54,10 @@ target_include_directories(parser_common PRIVATE ${METADEF_DIR}/inc/external/graph ${METADEF_DIR}/inc/external/register #### independent compile ##### - ${METADEF_DIR}/third_party/ge - ${METADEF_DIR}/third_party/ge/inc - ${METADEF_DIR}/third_party/ge/inc/framework - ${METADEF_DIR}/third_party/ge/inc/external + ${METADEF_DIR}/third_party/graphengine/ge + ${METADEF_DIR}/third_party/graphengine/inc + ${METADEF_DIR}/third_party/graphengine/inc/framework + ${METADEF_DIR}/third_party/graphengine/inc/external ${METADEF_DIR}/third_party/fwkacllib/inc #### temp #### ${PARSER_DIR}/../graphengine/inc/common/util diff --git a/parser/onnx/CMakeLists.txt b/parser/onnx/CMakeLists.txt index 7537eb3..dac5c89 100644 --- a/parser/onnx/CMakeLists.txt +++ b/parser/onnx/CMakeLists.txt @@ -42,10 +42,10 @@ target_include_directories(fmk_onnx_parser PRIVATE ${METADEF_DIR}/inc/external/graph ${METADEF_DIR}/inc/external/register #### independent compile ##### - ${METADEF_DIR}/third_party/ge - ${METADEF_DIR}/third_party/ge/inc - ${METADEF_DIR}/third_party/ge/inc/framework - ${METADEF_DIR}/third_party/ge/inc/external + ${METADEF_DIR}/third_party/graphengine/ge + ${METADEF_DIR}/third_party/graphengine/ge/inc + ${METADEF_DIR}/third_party/graphengine/inc/framework + ${METADEF_DIR}/third_party/graphengine/inc/external ${METADEF_DIR}/third_party/fwkacllib/inc #### temp #### ${PARSER_DIR}/../graphengine/inc/common/util From fc9f780eecac3a66b98bed0581fa0281f89af401 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Tue, 20 Oct 2020 12:51:09 +0800 Subject: [PATCH 3/4] update cmake --- parser/CMakeLists.txt | 2 +- parser/onnx/CMakeLists.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt index eaa2361..3b17728 100644 --- a/parser/CMakeLists.txt +++ b/parser/CMakeLists.txt @@ -73,7 +73,7 @@ target_include_directories(fmk_parser PRIVATE ${METADEF_DIR}/inc/external/register #### independent compile ##### ${METADEF_DIR}/third_party/graphengine/ge - ${METADEF_DIR}/third_party/graphengine/ge/inc + ${METADEF_DIR}/third_party/graphengine/inc ${METADEF_DIR}/third_party/graphengine/inc/framework ${METADEF_DIR}/third_party/graphengine/inc/external ${METADEF_DIR}/third_party/fwkacllib/inc diff --git a/parser/onnx/CMakeLists.txt b/parser/onnx/CMakeLists.txt index dac5c89..26fcce4 100644 --- a/parser/onnx/CMakeLists.txt +++ b/parser/onnx/CMakeLists.txt @@ -43,7 +43,7 @@ target_include_directories(fmk_onnx_parser PRIVATE ${METADEF_DIR}/inc/external/register #### independent compile ##### ${METADEF_DIR}/third_party/graphengine/ge - ${METADEF_DIR}/third_party/graphengine/ge/inc + ${METADEF_DIR}/third_party/graphengine/inc ${METADEF_DIR}/third_party/graphengine/inc/framework ${METADEF_DIR}/third_party/graphengine/inc/external ${METADEF_DIR}/third_party/fwkacllib/inc @@ -61,7 +61,6 @@ target_link_libraries(fmk_onnx_parser PRIVATE $ -Wl,--no-as-needed protobuf - ge_common register c_sec parser_common From 262a06b8c109e757a8e0097d139dfb6e39eba872 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Tue, 20 Oct 2020 12:53:54 +0800 Subject: [PATCH 4/4] update submodule metadef --- cmake/external_libs/protobuf_shared.cmake | 6 +++--- cmake/external_libs/protoc.cmake | 2 +- cmake/external_libs/securec.cmake | 2 +- metadef | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/external_libs/protobuf_shared.cmake b/cmake/external_libs/protobuf_shared.cmake index f2cbf99..0581ae8 100755 --- a/cmake/external_libs/protobuf_shared.cmake +++ b/cmake/external_libs/protobuf_shared.cmake @@ -14,10 +14,10 @@ endif() set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2") set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack") ExternalProject_Add(protobuf_build - #URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz + URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz #URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz - #SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 - DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 + #SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 + DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 #CONFIGURE_COMMAND ${CMAKE_COMMAND} #-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} #-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} diff --git a/cmake/external_libs/protoc.cmake b/cmake/external_libs/protoc.cmake index 3f44768..ff49681 100755 --- a/cmake/external_libs/protoc.cmake +++ b/cmake/external_libs/protoc.cmake @@ -15,7 +15,7 @@ endif() set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2") set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack") ExternalProject_Add(protoc_build - #URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz + URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz #URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=${protobuf_CXXFLAGS} -DCMAKE_CXX_LDFLAGS=${protobuf_LDFLAGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/protoc /cmake diff --git a/cmake/external_libs/securec.cmake b/cmake/external_libs/securec.cmake index 3c1bdf4..1047699 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 ${PARSER_DIR}/../libc_sec - PATCH_COMMAND patch -p1 < ${PARSER_DIR}/metadef/third_party/patch/securec/0001-add-securec-cmake-script.patch + PATCH_COMMAND patch -p1 < ${PARSER_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} diff --git a/metadef b/metadef index 693e892..c599dfd 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 693e892fa66c5da9b8976d93e5418ded2614fc4f +Subproject commit c599dfd701ad1f7a7ef149faedcf2b5dec93fafb