From 61d4025cc5255c7854cc9f8e521dd82cad837535 Mon Sep 17 00:00:00 2001 From: t00456437 Date: Mon, 30 Nov 2020 15:16:12 +0800 Subject: [PATCH] ge ut final --- CMakeLists.txt | 2 +- build.sh | 5 ++++- cmake/external_libs/protobuf_shared.cmake | 5 ++--- cmake/external_libs/protobuf_static.cmake | 2 +- cmake/external_libs/protoc.cmake | 5 ++--- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b5666bd..9d34e80e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,7 +121,7 @@ if (ENABLE_OPEN_SRC) message(STATUS "PLATFORM param is invalid, should be train or inference, you choose nothing!") endif() - if (ENABLE_GE_COV OR ENABLE_GE_UT OR ENABLE_GE_ST) + if (ENABLE_GE_COV OR ENABLE_GE_UT) add_subdirectory(tests) endif() diff --git a/build.sh b/build.sh index e14a26b9..423e1dc3 100644 --- a/build.sh +++ b/build.sh @@ -59,7 +59,7 @@ checkopts() ENABLE_GE_ST="off" ENABLE_GE_COV="off" GE_ONLY="on" - PLATFORM="inference" + PLATFORM="" PRODUCT="normal" ENABLE_GITEE="off" # Process the options @@ -166,6 +166,9 @@ build_graphengine() elif [ "x${PLATFORM}" = "xinference" ] then TARGET="ge_compiler atc_ge_local_engine atc_ge_local_opskernel_builder atc_host_cpu_engine atc_host_cpu_opskernel_builder atc opensrc_ascendcl ${TARGET}" + elif [ "X$ENABLE_GE_UT" = "Xon" ] + then + TARGET="ut_libgraph ut_libge_multiparts_utest ut_libge_others_utest ut_libge_kernel_utest ut_libge_distinct_load_utest" elif [ "x${PLATFORM}" = "xall" ] then # build all the target diff --git a/cmake/external_libs/protobuf_shared.cmake b/cmake/external_libs/protobuf_shared.cmake index 5ce8472a..b2956ee9 100755 --- a/cmake/external_libs/protobuf_shared.cmake +++ b/cmake/external_libs/protobuf_shared.cmake @@ -12,9 +12,8 @@ if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR endif() if (ENABLE_GITEE) - #set(REQ_URL "https://gitee.com/mirrors/protobuf_source/repository/archive/v3.8.0.tar.gz") - set(REQ_URL "/home/t00456437/workspace/v3.8.0.tar.gz") - #set(MD5 "eba86ae9f07ba5cfbaf8af3bc4e84236") + set(REQ_URL "https://gitee.com/mirrors/protobuf_source/repository/archive/v3.8.0.tar.gz") + set(MD5 "eba86ae9f07ba5cfbaf8af3bc4e84236") else() set(REQ_URL "https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz") set(MD5 "3d9e32700639618a4d2d342c99d4507a") diff --git a/cmake/external_libs/protobuf_static.cmake b/cmake/external_libs/protobuf_static.cmake index 51f4ed25..c262f509 100755 --- a/cmake/external_libs/protobuf_static.cmake +++ b/cmake/external_libs/protobuf_static.cmake @@ -20,7 +20,7 @@ set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fst set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack") set(PROTOBUF_STATIC_PKG_DIR ${CMAKE_INSTALL_PREFIX}/protobuf_static) ExternalProject_Add(protobuf_static_build - URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz + URL ${REQ_URL} #URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz #SOURCE_DIR ${METADEF_DIR}/../../third_party/protobuf/src/protobuf-3.8.0 CONFIGURE_COMMAND ${CMAKE_COMMAND} diff --git a/cmake/external_libs/protoc.cmake b/cmake/external_libs/protoc.cmake index 0f1c0da5..24b08801 100755 --- a/cmake/external_libs/protoc.cmake +++ b/cmake/external_libs/protoc.cmake @@ -13,9 +13,8 @@ if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR endif() if (ENABLE_GITEE) - #set(REQ_URL "https://gitee.com/mirrors/protobuf_source/repository/archive/v3.8.0.tar.gz") - #set(MD5 "eba86ae9f07ba5cfbaf8af3bc4e84236") - set(REQ_URL "/home/t00456437/workspace/v3.8.0.tar.gz") + set(REQ_URL "https://gitee.com/mirrors/protobuf_source/repository/archive/v3.8.0.tar.gz") + set(MD5 "eba86ae9f07ba5cfbaf8af3bc4e84236") else() set(REQ_URL "https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz") set(MD5 "3d9e32700639618a4d2d342c99d4507a")