From: @t00456437
Reviewed-by: @ji_chen,@xchu42
Signed-off-by: @ji_chen
pull/464/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit 785a9a630b

@ -37,6 +37,7 @@ if (ENABLE_OPEN_SRC)
include(cmake/external_libs/protobuf_static.cmake)
include(cmake/external_libs/protoc.cmake)
include(cmake/external_libs/gflags.cmake)
include(cmake/external_libs/gtest.cmake)
include(cmake/external_libs/securec.cmake)
include(cmake/external_libs/json.cmake)
include(cmake/FindModule.cmake)
@ -78,6 +79,7 @@ if (ENABLE_OPEN_SRC)
else()
find_module(slog libslog.so ${ASCEND_ATC_DIR})
find_module(static_mmpa libmmpa.a ${ASCEND_ATC_DIR})
find_module(error_manager liberror_manager.so ${ASCEND_ATC_DIR})
if(PLATFORM STREQUAL "train")
find_module(msprof libmsprof.so ${ASCEND_DRIVER_COMMON_DIR})
find_module(hccl libhccl.so ${ASCEND_RUNTIME_DIR})
@ -123,8 +125,13 @@ if (ENABLE_OPEN_SRC)
find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver)
#find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR})
else()
message(FATAL_ERROR "PLATFORM param is invalid, should be train or inference, build terminated")
message(STATUS "PLATFORM param is invalid, should be train or inference, you choose nothing!")
endif()
if (ENABLE_GE_COV OR ENABLE_GE_UT)
add_subdirectory(tests)
endif()
endif()
set(METADEF_DIR ${CMAKE_CURRENT_LIST_DIR}/metadef)

@ -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

@ -0,0 +1,60 @@
if (HAVE_GTEST)
return()
endif()
include(ExternalProject)
if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR
(${CMAKE_INSTALL_PREFIX} STREQUAL "C:/Program Files (x86)/ascend"))
set(CMAKE_INSTALL_PREFIX ${GE_CODE_DIR}/output CACHE STRING "path for install()" FORCE)
message(STATUS "No install prefix selected, default to ${CMAKE_INSTALL_PREFIX}.")
endif()
if (ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/googletest/repository/archive/release-1.8.0.tar.gz")
set(MD5 "")
else()
set(REQ_URL "https://github.com/google/googletest/archive/release-1.8.0.tar.gz")
set(MD5 "")
endif ()
set (gtest_CXXFLAGS "-D_GLIBCXX_USE_CXX11_ABI=0 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector-all -Wl,-z,relro,-z,now,-z,noexecstack")
set (gtest_CFLAGS "-D_GLIBCXX_USE_CXX11_ABI=0 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector-all -Wl,-z,relro,-z,now,-z,noexecstack")
ExternalProject_Add(gtest_build
URL ${REQ_URL}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_CXX_FLAGS=${gtest_CXXFLAGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/gtest <SOURCE_DIR>
-DBUILD_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_MACOSX_RPATH=TRUE -Dgtest_disable_pthreads=ON
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
EXCLUDE_FROM_ALL TRUE
)
set(GTEST_PKG_DIR ${CMAKE_INSTALL_PREFIX}/gtest)
file(MAKE_DIRECTORY ${GTEST_PKG_DIR}/include)
add_library(gtest SHARED IMPORTED)
set_target_properties(gtest PROPERTIES
IMPORTED_LOCATION ${GTEST_PKG_DIR}/lib/libgtest.so
)
add_library(gtest_main SHARED IMPORTED)
set_target_properties(gtest_main PROPERTIES
IMPORTED_LOCATION ${GTEST_PKG_DIR}/lib/libgtest_main.so
)
target_include_directories(gtest INTERFACE ${GTEST_PKG_DIR}/include)
target_include_directories(gtest_main INTERFACE ${GTEST_PKG_DIR}/include)
set(INSTALL_BASE_DIR "")
set(INSTALL_LIBRARY_DIR lib)
install(FILES ${GTEST_PKG_DIR}/lib/libgtest.so ${GTEST_PKG_DIR}/lib/libgtest_main.so OPTIONAL
DESTINATION ${INSTALL_LIBRARY_DIR})
add_dependencies(gtest gtest_build)
#set(HAVE_GFLAGS TRUE CACHE BOOL "gflags build add")
set(HAVE_GTEST TRUE)

@ -22,7 +22,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 -Dgoogle=ascend_private")
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 ${REQ_URL}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-Dprotobuf_WITH_ZLIB=OFF
-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}

@ -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}

@ -22,6 +22,7 @@ add_subdirectory(depends/runtime)
add_subdirectory(depends/omg)
add_subdirectory(depends/hccl)
add_subdirectory(depends/profiler)
add_subdirectory(depends/error_manager)
if (ENABLE_GE_COV OR ENABLE_GE_UT)
add_subdirectory(ut)

@ -13,60 +13,84 @@
# limitations under the License.
# ============================================================================
cmake_minimum_required(VERSION 2.8)
#cmake_minimum_required(VERSION 2.8)
project(STUB_CCE)
set(CMAKE_CXX_STANDARD 11)
include_directories(${GE_SOURCE_DIR}/inc)
include_directories(${GE_SOURCE_DIR}/inc/framework)
include_directories(${GE_SOURCE_DIR}/inc/graph)
include_directories(${GE_SOURCE_DIR}/inc/external)
include_directories(${GE_SOURCE_DIR}/inc/external/graph)
include_directories(${GE_SOURCE_DIR}/src/common)
include_directories(${GE_SOURCE_DIR}/src/common/graph)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc/cce)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc/ops)
include_directories(${GE_CODE_DIR}/inc)
include_directories(${GE_CODE_DIR}/inc/framework)
include_directories(${GE_CODE_DIR}/metadef/inc/graph)
include_directories(${GE_CODE_DIR}/inc/external)
include_directories(${GE_CODE_DIR}/metadef/inc/external)
include_directories(${GE_CODE_DIR}/metadef/inc/external/graph)
include_directories(${GE_CODE_DIR}/metadef)
include_directories(${GE_CODE_DIR}/metadef/inc)
include_directories(${GE_CODE_DIR}/metadef/graph)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc/cce)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc/ops)
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_BINARY_DIR}/proto/ge)
file(GLOB_RECURSE PROTO_LIST RELATIVE ${CMAKE_CURRENT_LIST_DIR}
"${GE_SOURCE_DIR}/src/proto/om.proto"
"${GE_SOURCE_DIR}/src/proto/ge_ir.proto"
"${GE_SOURCE_DIR}/src/proto/task.proto"
set(PROTO_LIST
"${GE_CODE_DIR}/metadef/proto/om.proto"
"${GE_CODE_DIR}/metadef/proto/ge_ir.proto"
"${GE_CODE_DIR}/metadef/proto/task.proto"
)
ge_protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR}
"${GE_SOURCE_DIR}/src/common/graph/ge_attr_define.cc"
"${GE_SOURCE_DIR}/src/common/graph/anchor.cc"
"${GE_SOURCE_DIR}/src/common/graph/ge_attr_value.cc"
"${GE_SOURCE_DIR}/src/common/graph/buffer.cc"
"${GE_SOURCE_DIR}/src/common/graph/compute_graph.cc"
"${GE_SOURCE_DIR}/src/common/graph/graph.cc"
"${GE_SOURCE_DIR}/src/common/graph/model.cc"
"${GE_SOURCE_DIR}/src/common/graph/model_serialize.cc"
"${GE_SOURCE_DIR}/src/common/graph/node.cc"
"${GE_SOURCE_DIR}/src/common/graph/op_desc.cc"
"${GE_SOURCE_DIR}/src/common/graph/operator.cc"
"${GE_SOURCE_DIR}/src/common/graph/operator_factory.cc"
"${GE_SOURCE_DIR}/src/common/graph/operator_factory_impl.cc"
"${GE_SOURCE_DIR}/src/common/graph/tensor.cc"
"${GE_SOURCE_DIR}/src/common/graph/detail/attributes_holder.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/anchor_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/graph_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/node_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/op_desc_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/type_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/op_imp.cc"
"${GE_SOURCE_DIR}/src/common/graph/shape_refiner.cc"
"${GE_SOURCE_DIR}/src/common/graph/ge_tensor.cc"
"${GE_SOURCE_DIR}/src/common/graph/opsproto/opsproto_manager.cc"
set(SRCS
"${GE_CODE_DIR}/metadef/graph/ge_attr_define.cc"
"${GE_CODE_DIR}/metadef/graph/anchor.cc"
"${GE_CODE_DIR}/metadef/graph/ge_attr_value.cc"
"${GE_CODE_DIR}/metadef/graph/buffer.cc"
"${GE_CODE_DIR}/metadef/graph/compute_graph.cc"
"${GE_CODE_DIR}/metadef/graph/graph.cc"
"${GE_CODE_DIR}/metadef/graph/model.cc"
"${GE_CODE_DIR}/metadef/graph/model_serialize.cc"
"${GE_CODE_DIR}/metadef/graph/node.cc"
"${GE_CODE_DIR}/metadef/graph/op_desc.cc"
"${GE_CODE_DIR}/metadef/graph/operator.cc"
"${GE_CODE_DIR}/metadef/graph/operator_factory.cc"
"${GE_CODE_DIR}/metadef/graph/operator_factory_impl.cc"
"${GE_CODE_DIR}/metadef/graph/tensor.cc"
"${GE_CODE_DIR}/metadef/graph/detail/attributes_holder.cc"
"${GE_CODE_DIR}/metadef/graph/utils/anchor_utils.cc"
"${GE_CODE_DIR}/metadef/graph/utils/graph_utils.cc"
"${GE_CODE_DIR}/metadef/graph/utils/node_utils.cc"
"${GE_CODE_DIR}/metadef/graph/utils/op_desc_utils.cc"
"${GE_CODE_DIR}/metadef/graph/utils/type_utils.cc"
"${GE_CODE_DIR}/metadef/ops/op_imp.cpp"
"${GE_CODE_DIR}/metadef/graph/shape_refiner.cc"
"${GE_CODE_DIR}/metadef/graph/ge_tensor.cc"
"${GE_CODE_DIR}/metadef/graph/opsproto/opsproto_manager.cc"
)
add_library(cce_ge_stub SHARED src/cce_stub.cc ${PROTO_SRCS} ${PROTO_HDRS})
target_link_libraries(cce_ge_stub protobuf::protobuf)
target_compile_definitions(cce_ge_stub PRIVATE
google=ascend_private
)
target_link_libraries(cce_ge_stub
$<BUILD_INTERFACE:intf_pub>
-Wl,--no-as-needed
ascend_protobuf
-Wl,--as-needed
c_sec
)
add_library(cce_stub SHARED ${SRCS} ${PROTO_SRCS} ${PROTO_HDRS})
target_link_libraries(cce_stub protobuf::protobuf)
target_compile_definitions(cce_stub PRIVATE
google=ascend_private
)
target_link_libraries(cce_stub PRIVATE
$<BUILD_INTERFACE:intf_pub>
-Wl,--no-as-needed
ascend_protobuf
-Wl,--as-needed
c_sec
)

@ -0,0 +1,34 @@
# Copyright 2019-2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
#cmake_minimum_required(VERSION 2.8)
project(STUB_ERROR_MANAGER)
file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR}
"src/error_manager_stub.cc"
)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_CODE_DIR}/inc)
include_directories(${GE_CODE_DIR}/inc/external)
include_directories(${GE_CODE_DIR}/metadef/inc)
include_directories(${GE_CODE_DIR}/inc/framework)
include_directories(${GE_CODE_DIR}/metadef/inc/external)
add_library(error_manager_stub SHARED ${SRCS})
target_link_libraries(error_manager_stub PRIVATE
$<BUILD_INTERFACE:intf_pub>
)

@ -0,0 +1,85 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "common/util/error_manager/error_manager.h"
ErrorManager &ErrorManager::GetInstance() {
static ErrorManager instance;
return instance;
}
///
/// @brief init
/// @param [in] path: current so path
/// @return int 0(success) -1(fail)
///
int ErrorManager::Init(std::string path) { return 0; }
///
/// @brief Report error message
/// @param [in] error_code: error code
/// @param [in] args_map: parameter map
/// @return int 0(success) -1(fail)
///
int ErrorManager::ReportErrMessage(std::string error_code, const std::map<std::string, std::string> &args_map) {
return 0;
}
///
/// @brief output error message
/// @param [in] handle: print handle
/// @return int 0(success) -1(fail)
///
int ErrorManager::OutputErrMessage(int handle) { return 0; }
///
/// @brief output message
/// @param [in] handle: print handle
/// @return int 0(success) -1(fail)
///
int ErrorManager::OutputMessage(int handle) { return 0; }
///
/// @brief Report error message
/// @param [in] key: vector parameter key
/// @param [in] value: vector parameter value
///
void ErrorManager::ATCReportErrMessage(std::string error_code, const std::vector<std::string> &key,
const std::vector<std::string> &value) {
}
///
/// @brief report graph compile failed message such as error code and op_name in mstune case
/// @param [in] msg: failed message map, key is error code, value is op_name
/// @return int 0(success) -1(fail)
///
int ErrorManager::ReportMstuneCompileFailedMsg(const std::map<std::string, std::string> &msg) { return 0; }
///
/// @brief save graph compile failed message from thread local map to global map
/// @param [in] graph_name: graph name
///
void ErrorManager::SaveMstuneCompileFailedMsg(const std::string &graph_name) {}
///
/// @brief get graph compile failed message in mstune case
/// @param [in] graph_name: graph name
/// @param [out] msg_map: failed message map, key is error code, value is op_name list
/// @return int 0(success) -1(fail)
///
int ErrorManager::GetMstuneCompileFailedMsg(const std::string &graph_name, std::map<std::string, std::vector<std::string>> &msg_map) { return 0; }

@ -13,14 +13,18 @@
# limitations under the License.
# ============================================================================
cmake_minimum_required(VERSION 2.8)
#cmake_minimum_required(VERSION 2.8)
project(hccl_stub)
file(GLOB_RECURSE SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
"src/hccl_stub.cc"
)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_SOURCE_DIR}/inc)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_CODE_DIR}/inc)
add_library(hccl_stub SHARED ${SRC_FILES})
add_library(hccl_stub SHARED ${SRC_FILES})
target_link_libraries(hccl_stub PRIVATE
$<BUILD_INTERFACE:intf_pub>
)

@ -18,27 +18,27 @@
#include "hccl/hcom.h"
hcclResult_t hcom_all_gather(const char *tag, void *input_count_ptr, void *output_ptr, u64 input_count,
hcclDataType_t data_type, const char *group, rtStream_t stream) {
HcclResult hcom_all_gather(const char *tag, void *input_count_ptr, void *output_ptr, u64 input_count,
HcclDataType data_type, const char *group, rtStream_t stream) {
return HCCL_SUCCESS;
}
hcclResult_t hcom_broadcast(const char *tag, void *ptr, u64 count, hcclDataType_t data_type, u32 root,
HcclResult hcom_broadcast(const char *tag, void *ptr, u64 count, HcclDataType data_type, u32 root,
const char *group, rtStream_t stream) {
return HCCL_SUCCESS;
}
hcclResult_t hcom_all_reduce(const char *tag, void *input_ptr, void *output_ptr, u64 count, hcclDataType_t data_type,
hcclRedOp_t op, const char *group, rtStream_t stream) {
HcclResult hcom_all_reduce(const char *tag, void *input_ptr, void *output_ptr, u64 count, HcclDataType data_type,
HcclReduceOp op, const char *group, rtStream_t stream) {
return HCCL_SUCCESS;
}
hcclResult_t hcom_get_split_strategy(const char *group, const struct model_feature *feature, u32 max_segment_num,
HcclResult hcom_get_split_strategy(const char *group, const struct model_feature *feature, u32 max_segment_num,
u32 *segment_num, u32 *segment_idx) {
return HCCL_SUCCESS;
}
hcclResult_t hcom_reduce_scatter(const char *tag, void *input_ptr, void *output_ptr, u64 count,
hcclDataType_t data_type, hcclRedOp_t op, const char *group, rtStream_t stream) {
HcclResult hcom_reduce_scatter(const char *tag, void *input_ptr, void *output_ptr, u64 count,
HcclDataType data_type, HcclReduceOp op, const char *group, rtStream_t stream) {
return HCCL_SUCCESS;
}
}

@ -13,7 +13,7 @@
# limitations under the License.
# ============================================================================
cmake_minimum_required(VERSION 2.8)
#cmake_minimum_required(VERSION 2.8)
project(STUB_MMPA)
@ -21,10 +21,18 @@ file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR}
"src/mmpa_stub.cc"
)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_SOURCE_DIR}/inc)
include_directories(${GE_SOURCE_DIR}/inc/framework)
include_directories(${GE_SOURCE_DIR}/inc/external)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_CODE_DIR}/inc)
include_directories(${GE_CODE_DIR}/inc/external)
include_directories(${GE_CODE_DIR}/metadef/inc)
include_directories(${GE_CODE_DIR}/inc/framework)
include_directories(${GE_CODE_DIR}/metadef/inc/external)
add_library(mmpa_stub SHARED ${SRCS})
target_link_libraries(mmpa_stub protobuf::protobuf)
target_link_libraries(mmpa_stub PRIVATE
$<BUILD_INTERFACE:intf_pub>
-Wl,--no-as-needed
ascend_protobuf
-Wl,--as-needed
c_sec
)

@ -217,3 +217,58 @@ INT32 mmScandir(const CHAR *path, mmDirent ***entryList, mmFilter filterFunc, m
VOID mmScandirFree(mmDirent **entryList, INT32 count)
{
}
INT32 mmAccess2(const CHAR *pathName, INT32 mode)
{
return 0;
}
INT32 mmGetTimeOfDay(mmTimeval *timeVal, mmTimezone *timeZone)
{
return 0;
}
INT32 mmRealPath(const CHAR *path, CHAR *realPath, INT32 realPathLen)
{
return 0;
}
INT32 mmGetErrorCode()
{
return 0;
}
INT32 mmIsDir(const CHAR *fileName)
{
return 0;
}
INT32 mmGetEnv(const CHAR *name, CHAR *value, UINT32 len)
{
return 0;
}
INT32 mmDlclose(VOID *handle)
{
return 0;
}
CHAR *mmDlerror()
{
return "";
}
INT32 mmDladdr(VOID *addr, mmDlInfo *info)
{
return 0;
}
VOID *mmDlopen(const CHAR *fileName, INT32 mode)
{
return NULL;
}
VOID *mmDlsym(VOID *handle, const CHAR *funcName)
{
return NULL;
}

@ -13,33 +13,47 @@
# limitations under the License.
# ============================================================================
cmake_minimum_required(VERSION 2.8)
#cmake_minimum_required(VERSION 2.8)
project(OMG_CCE)
set(CMAKE_CXX_STANDARD 11)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc/cce)
include_directories(${GE_SOURCE_DIR}/inc)
include_directories(${GE_SOURCE_DIR}/inc/framework)
include_directories(${GE_SOURCE_DIR}/inc/graph)
include_directories(${GE_SOURCE_DIR}/inc/external)
include_directories(${GE_SOURCE_DIR}/inc/external/graph)
include_directories(${GE_SOURCE_DIR}/src/ge)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc/cce)
include_directories(${GE_CODE_DIR}/inc)
include_directories(${GE_CODE_DIR}/metadef/inc)
include_directories(${GE_CODE_DIR}/inc/framework)
include_directories(${GE_CODE_DIR}/metadef/inc/graph)
include_directories(${GE_CODE_DIR}/inc/external)
include_directories(${GE_CODE_DIR}/metadef/inc/external)
include_directories(${GE_CODE_DIR}/metadef/inc/external/graph)
include_directories(${GE_CODE_DIR}/ge)
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_BINARY_DIR}/proto/ge)
file(GLOB_RECURSE PROTO_LIST RELATIVE ${CMAKE_CURRENT_LIST_DIR}
"${GE_SOURCE_DIR}/src/proto/om.proto"
"${GE_SOURCE_DIR}/src/proto/task.proto"
set(PROTO_LIST
"${GE_CODE_DIR}/metadef/proto/om.proto"
"${GE_CODE_DIR}/metadef/proto/task.proto"
)
ge_protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR}
# "${GE_SOURCE_DIR}/src/ge/common/util.cc"
"src/omg_stub.cc"
set(SRCS
# "${GE_CODE_DIR}/src/ge/common/util.cc"
"src/omg_stub.cc"
)
add_library(omg_stub SHARED ${SRCS} ${PROTO_SRCS} ${PROTO_HDRS})
target_link_libraries(omg_stub protobuf::protobuf)
target_compile_definitions(omg_stub PRIVATE
google=ascend_private
)
target_link_libraries(omg_stub PRIVATE
$<BUILD_INTERFACE:intf_pub>
-Wl,--no-as-needed
ascend_protobuf
-Wl,--as-needed
c_sec
json
)

@ -643,7 +643,7 @@ Status GetInputOutputDescInfo(uint32_t model_id, vector<InputOutputDescInfo> &in
}
Status DataInput(const InputData *input_data, OutputData *output_data) { return SUCCESS; }
/*
class ModelManager {
public:
static std::shared_ptr<ModelManager> GetInstance();
@ -741,6 +741,8 @@ Status ModelManager::ExecuteModel(uint32_t model_id, rtStream_t stream, bool asy
return SUCCESS;
}
*/
} // namespace ge
namespace ge {

@ -13,12 +13,16 @@
# limitations under the License.
# ============================================================================
cmake_minimum_required(VERSION 2.8)
#cmake_minimum_required(VERSION 2.8)
project(profiler_stub)
file(GLOB_RECURSE SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
"src/profiler_stub.cc"
)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc)
add_library(profiler_stub SHARED ${SRC_FILES})
add_library(profiler_stub SHARED ${SRC_FILES})
target_link_libraries(profiler_stub PRIVATE
$<BUILD_INTERFACE:intf_pub>
)

@ -13,7 +13,7 @@
# limitations under the License.
# ============================================================================
cmake_minimum_required(VERSION 2.8)
#cmake_minimum_required(VERSION 2.8)
project(STUB_MMPA)
@ -21,7 +21,12 @@ file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR}
"src/runtime_stub.cc"
)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_SOURCE_DIR}/inc/framework)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_CODE_DIR}/inc/framework)
add_library(runtime_stub SHARED ${SRCS})
target_link_libraries(runtime_stub PRIVATE
$<BUILD_INTERFACE:intf_pub>
c_sec
)

@ -221,8 +221,9 @@ rtError_t rtCpuKernelLaunch(const void *so_name, const void *kernel_name, uint32
return RT_ERROR_NONE;
}
rtError_t rtModelGetTaskId(void *handle, uint32_t *task_id) {
rtError_t rtModelGetTaskId(void *handle, uint32_t *task_id, uint32_t *stream_id) {
*task_id = 0;
*stream_id = 0;
return RT_ERROR_NONE;
}
rtError_t rtEndGraph(rtModel_t model, rtStream_t stream) { return RT_ERROR_NONE; }
@ -307,3 +308,79 @@ rtError_t rtModelBindQueue(rtModel_t model, uint32_t queueId, rtModelQueueFlag_t
{
return RT_ERROR_NONE;
}
rtError_t rtSetSocVersion(const char *version)
{
return RT_ERROR_NONE;
}
rtError_t rtGetSocVersion(char *version, const uint32_t maxLen)
{
return RT_ERROR_NONE;
}
rtError_t rtSetTaskFailCallback(rtTaskFailCallback callback)
{
return RT_ERROR_NONE;
}
rtError_t rtMallocHostSharedMemory(rtMallocHostSharedMemoryIn *in,
rtMallocHostSharedMemoryOut *out)
{
out->ptr = new uint8_t[in->size];
out->devPtr = new uint8_t[in->size];
return RT_ERROR_NONE;
}
rtError_t rtFreeHostSharedMemory(rtFreeHostSharedMemoryIn *in)
{
delete[] (uint8_t*)in->ptr;
delete[] (uint8_t*)in->devPtr;
return RT_ERROR_NONE;
}
rtError_t rtGetAicpuDeploy(rtAicpuDeployType_t *deplyType)
{
return RT_ERROR_NONE;
}
rtError_t rtDebugRegister(rtModel_t model, uint32_t flag, const void *addr, uint32_t *streamId, uint32_t *taskId)
{
return RT_ERROR_NONE;
}
rtError_t rtDebugUnRegister(rtModel_t model)
{
return RT_ERROR_NONE;
}
rtError_t rtDumpAddrSet(rtModel_t model, void *addr, uint32_t dumpSize, uint32_t flag)
{
return RT_ERROR_NONE;
}
rtError_t rtSetCtxINFMode(bool mode)
{
return RT_ERROR_NONE;
}
rtError_t rtLabelCreateEx(rtLabel_t *label, rtStream_t stream)
{
*label = new uint32_t;
return RT_ERROR_NONE;
}
rtError_t rtGetRtCapability(rtFeatureType_t featureType, int32_t featureInfo, int64_t *value)
{
return RT_ERROR_NONE;
}
rtError_t rtGetMaxStreamAndTask(uint32_t streamType, uint32_t *maxStrCount, uint32_t *maxTaskCount)
{
return RT_ERROR_NONE;
}
rtError_t rtModelExit(rtModel_t model, rtStream_t stream)
{
return RT_ERROR_NONE;
}

@ -13,11 +13,14 @@
# limitations under the License.
# ============================================================================
cmake_minimum_required(VERSION 2.8)
#cmake_minimum_required(VERSION 2.8)
project(slog_stub)
file(GLOB_RECURSE SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
"src/*.cc"
)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc)
add_library(slog_stub SHARED ${SRC_FILES})
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc)
add_library(slog_stub SHARED ${SRC_FILES})
target_link_libraries(slog_stub PRIVATE
$<BUILD_INTERFACE:intf_pub>
)

@ -38,6 +38,8 @@ void DlogWithKVInner(int module_id, int level, KeyValue *pst_kv_array, int kv_nu
dav_log(module_id, fmt);
}
int dlog_setlevel(int module_id, int level, int enable_event) { return DLOG_DEBUG; }
int dlog_getlevel(int module_id, int *enable_event) { return DLOG_DEBUG; }
int CheckLogLevel(int moduleId, int logLevel)

@ -17,30 +17,34 @@ project(ut_libgraph)
set(CMAKE_CXX_STANDARD 11)
file(GLOB_RECURSE PROTO_LIST RELATIVE ${CMAKE_CURRENT_LIST_DIR}
"${GE_SOURCE_DIR}/src/proto/om.proto"
"${GE_SOURCE_DIR}/src/proto/ge_ir.proto"
"${onnx_INC}/onnx/onnx.proto"
set(PROTO_LIST
"${GE_CODE_DIR}/metadef/proto/om.proto"
"${GE_CODE_DIR}/metadef/proto/ge_ir.proto"
"${GE_CODE_DIR}/metadef/proto/proto_inner/ge_onnx.proto"
)
ge_protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
# include directories
include_directories(${CMAKE_CURRENT_LIST_DIR})
include_directories(${GE_SOURCE_DIR}/src)
include_directories(${GE_SOURCE_DIR}/src/common)
include_directories(${GE_SOURCE_DIR}/src/common/graph)
include_directories(${GE_SOURCE_DIR}/inc)
include_directories(${GE_SOURCE_DIR}/inc/external)
include_directories(${GE_SOURCE_DIR}/inc/external/graph)
include_directories(${GE_SOURCE_DIR}/inc/graph)
include_directories(${GE_SOURCE_DIR}/inc/common)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_SOURCE_DIR}/third_party/fwkacllib/inc/ops)
include_directories(${GE_CODE_DIR})
include_directories(${GE_CODE_DIR}/metadef)
include_directories(${GE_CODE_DIR}/metadef/graph)
include_directories(${GE_CODE_DIR}/inc)
include_directories(${GE_CODE_DIR}/inc/external)
include_directories(${GE_CODE_DIR}/metadef/inc/external)
include_directories(${GE_CODE_DIR}/metadef/inc/external/graph)
include_directories(${GE_CODE_DIR}/metadef/inc)
include_directories(${GE_CODE_DIR}/metadef/inc/graph)
include_directories(${GE_CODE_DIR}/metadef/inc/common)
include_directories(${GE_CODE_DIR}/metadef/third_party)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc)
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc/ops)
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_BINARY_DIR}/proto/ge)
include_directories(${CMAKE_BINARY_DIR}/proto/ge/proto)
file(GLOB_RECURSE UT_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
set(UT_FILES
"testcase/ge_graph/ge_anchor_utils_unittest.cc"
"testcase/ge_graph/ge_def_type_unittest.cc"
"testcase/ge_graph/ge_graph_anchor_unittest.cc"
@ -56,41 +60,59 @@ file(GLOB_RECURSE UT_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
"testcase/ge_graph/ge_model_unittest.cc"
)
file(GLOB_RECURSE SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
"${GE_SOURCE_DIR}/src/common/graph/option/ge_local_context.cc"
"${GE_SOURCE_DIR}/src/common/graph/option/ge_context.cc"
"${GE_SOURCE_DIR}/src/common/graph/anchor.cc"
"${GE_SOURCE_DIR}/src/common/graph/ge_attr_value.cc"
"${GE_SOURCE_DIR}/src/common/graph/attr_value.cc"
"${GE_SOURCE_DIR}/src/common/graph/buffer.cc"
"${GE_SOURCE_DIR}/src/common/graph/compute_graph.cc"
"${GE_SOURCE_DIR}/src/common/graph/ge_attr_define.cc"
"${GE_SOURCE_DIR}/src/common/graph/graph.cc"
"${GE_SOURCE_DIR}/src/common/graph/model.cc"
"${GE_SOURCE_DIR}/src/common/graph/model_serialize.cc"
"${GE_SOURCE_DIR}/src/common/graph/node.cc"
"${GE_SOURCE_DIR}/src/common/graph/op_desc.cc"
"${GE_SOURCE_DIR}/src/common/graph/operator.cc"
"${GE_SOURCE_DIR}/src/common/graph/operator_reg.cc"
"${GE_SOURCE_DIR}/src/common/graph/operator_factory.cc"
"${GE_SOURCE_DIR}/src/common/graph/operator_factory_impl.cc"
"${GE_SOURCE_DIR}/src/common/graph/range_vistor.cc"
"${GE_SOURCE_DIR}/src/common/graph/tensor.cc"
"${GE_SOURCE_DIR}/src/common/graph/ge_tensor.cc"
"${GE_SOURCE_DIR}/src/common/graph/shape_refiner.cc"
"${GE_SOURCE_DIR}/src/common/graph/format_refiner.cc"
"${GE_SOURCE_DIR}/src/common/graph/inference_context.cc"
"${GE_SOURCE_DIR}/src/common/graph/detail/attributes_holder.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/anchor_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/graph_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/node_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/op_desc_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/type_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/ge_ir_utils.cc"
"${GE_SOURCE_DIR}/src/common/graph/utils/tensor_utils.cc"
"${GE_SOURCE_DIR}/src/common/ops/op_imp.cc"
"${GE_SOURCE_DIR}/src/common/graph/opsproto/opsproto_manager.cc"
set(SRC_FILES
#"${GE_CODE_DIR}/metadef/graph/option/ge_local_context.cc"
#"${GE_CODE_DIR}/metadef/graph/option/ge_context.cc"
#"${GE_CODE_DIR}/metadef/graph/anchor.cc"
#"${GE_CODE_DIR}/metadef/graph/ge_attr_value.cc"
#"${GE_CODE_DIR}/metadef/graph/attr_value.cc"
#"${GE_CODE_DIR}/metadef/graph/buffer.cc"
#"${GE_CODE_DIR}/metadef/graph/compute_graph.cc"
#"${GE_CODE_DIR}/metadef/graph/ge_attr_define.cc"
#"${GE_CODE_DIR}/metadef/graph/graph.cc"
#"${GE_CODE_DIR}/metadef/graph/gnode.cc"
#"${GE_CODE_DIR}/metadef/graph/ascend_string.cc"
#"${GE_CODE_DIR}/metadef/graph/model.cc"
#"${GE_CODE_DIR}/metadef/graph/model_serialize.cc"
#"${GE_CODE_DIR}/metadef/graph/node.cc"
#"${GE_CODE_DIR}/metadef/graph/op_desc.cc"
#"${GE_CODE_DIR}/metadef/graph/operator.cc"
#"${GE_CODE_DIR}/metadef/graph/operator_reg.cc"
#"${GE_CODE_DIR}/metadef/graph/operator_factory.cc"
#"${GE_CODE_DIR}/metadef/graph/operator_factory_impl.cc"
#"${GE_CODE_DIR}/metadef/graph/range_vistor.cc"
#"${GE_CODE_DIR}/metadef/graph/tensor.cc"
#"${GE_CODE_DIR}/metadef/graph/ge_tensor.cc"
#"${GE_CODE_DIR}/metadef/graph/shape_refiner.cc"
#"${GE_CODE_DIR}/metadef/graph/format_refiner.cc"
#"${GE_CODE_DIR}/metadef/graph/inference_context.cc"
#"${GE_CODE_DIR}/metadef/graph/detail/attributes_holder.cc"
#"${GE_CODE_DIR}/metadef/graph/utils/anchor_utils.cc"
#"${GE_CODE_DIR}/metadef/graph/utils/graph_utils.cc"
#"${GE_CODE_DIR}/metadef/graph/utils/node_utils.cc"
#"${GE_CODE_DIR}/metadef/graph/utils/op_desc_utils.cc"
#"${GE_CODE_DIR}/metadef/graph/utils/type_utils.cc"
#"${GE_CODE_DIR}/metadef/graph/utils/ge_ir_utils.cc"
#"${GE_CODE_DIR}/metadef/graph/utils/tensor_utils.cc"
"${GE_CODE_DIR}/metadef/ops/op_imp.cpp"
#"${GE_CODE_DIR}/metadef/graph/opsproto/opsproto_manager.cc"
)
#add_executable(ut_libgraph ${UT_FILES} ${SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS})
add_executable(ut_libgraph ${UT_FILES} ${SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS})
target_link_libraries(ut_libgraph graphengine::gtest graphengine::gtest_main slog_stub protobuf::protobuf graphengine::securec rt dl)
target_compile_definitions(ut_libgraph PRIVATE
google=ascend_private
)
target_link_libraries(ut_libgraph
$<BUILD_INTERFACE:intf_pub>
graph
gtest
gtest_main
slog_stub
ascend_protobuf
c_sec
-lrt
-ldl
)

@ -85,7 +85,7 @@ ut::GraphBuilder BuildGraph1() {
builder.AddDataEdge(var2, 0, conv1, 1);
builder.AddDataEdge(conv1, 0, relu1, 0);
builder.AddDataEdge(relu1, 0, netoutput1, 0);
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
return builder;
}
@ -134,7 +134,7 @@ ut::GraphBuilder BuildGraph2() {
builder.AddDataEdge(var6, 0, bn1, 4);
builder.AddDataEdge(bn1, 0, relu1, 0);
builder.AddDataEdge(relu1, 0, netoutput1, 0);
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
return builder;
}
@ -189,7 +189,7 @@ ut::GraphBuilder BuildGraph3() {
builder.AddDataEdge(relu1, 0, conv2, 0);
builder.AddDataEdge(var3, 0, conv2, 1);
builder.AddDataEdge(conv2, 0, netoutput1, 0);
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
return builder;
}
@ -248,7 +248,7 @@ ut::GraphBuilder BuildGraph4() {
builder.AddDataEdge(relu1, 0, conv2, 0);
builder.AddDataEdge(var3, 0, conv2, 1);
builder.AddDataEdge(conv2, 0, netoutput1, 0);
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
return builder;
}
@ -305,7 +305,7 @@ ut::GraphBuilder BuilderGraph5() {
builder.AddDataEdge(relug1, 0, bng1, 0);
builder.AddDataEdge(bng1, 0, apply1, 0);
builder.AddDataEdge(apply1, 0, netoutput1, 0);
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
return builder;
}
@ -353,7 +353,7 @@ ut::GraphBuilder BuildGraph6() {
builder.AddDataEdge(constant, 0, addn, 2);
builder.AddDataEdge(addn, 0, netoutput, 0);
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
return builder;
}
@ -397,7 +397,7 @@ ut::GraphBuilder BuildGraph7() {
builder.AddDataEdge(constant, 0, addn, 2);
builder.AddDataEdge(addn, 0, netoutput, 0);
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
return builder;
}
@ -449,7 +449,7 @@ ut::GraphBuilder BuildGraph8() {
builder.AddDataEdge(relu, 0, reshape, 0);
builder.AddDataEdge(reshape, 0, conv, 1);
builder.AddDataEdge(conv, 0, netoutput, 0);
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
return builder;
}
} // namespace
@ -457,7 +457,7 @@ ut::GraphBuilder BuildGraph8() {
TEST_F(UtestFormatRefiner, data_format) {
auto builder = BuildGraph8();
auto graph = builder.GetGraph();
FormatRefiner::SetInferOrigineFormatFlag(false);
//FormatRefiner::SetInferOrigineFormatFlag(false);
graph->SaveDataFormat(FORMAT_NCHW);
EXPECT_EQ(FormatRefiner::InferOrigineFormat(graph), GRAPH_SUCCESS);
auto data2 = graph->FindNode("data2");
@ -466,18 +466,18 @@ TEST_F(UtestFormatRefiner, data_format) {
EXPECT_EQ(data2->GetOpDesc()->GetOutputDesc(0).GetOriginFormat(), FORMAT_NCHW);
EXPECT_EQ(relu->GetOpDesc()->GetInputDesc(0).GetOriginFormat(), FORMAT_NCHW);
EXPECT_EQ(relu->GetOpDesc()->GetOutputDesc(0).GetOriginFormat(), FORMAT_NCHW);
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
}
TEST_F(UtestFormatRefiner, constant_fail) {
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
auto builder = BuildGraph6();
auto graph = builder.GetGraph();
EXPECT_EQ(FormatRefiner::InferOrigineFormat(graph), GRAPH_FAILED);
}
TEST_F(UtestFormatRefiner, scalar_nodes_infer) {
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
auto builder = BuildGraph6();
auto graph = builder.GetGraph();
auto constant = graph->FindNode("constant");
@ -650,7 +650,7 @@ TEST_F(UtestFormatRefiner, infer_origine_format_failed) {
}
TEST_F(UtestFormatRefiner, save_format) {
FormatRefiner::SetInferOrigineFormatFlag(true);
//FormatRefiner::SetInferOrigineFormatFlag(true);
auto builder = BuildGraph6();
auto graph = builder.GetGraph();
graph->SaveDataFormat(FORMAT_NHWC);
@ -658,4 +658,4 @@ TEST_F(UtestFormatRefiner, save_format) {
EXPECT_EQ(save_format, FORMAT_NHWC);
graph->SaveDataFormat(FORMAT_ND);
}
} // namespace ge
} // namespace ge

@ -151,7 +151,7 @@ TEST_F(UtestGeNode, update_opdesc) {
EXPECT_EQ(n1->UpdateOpDesc(desc_ptr2), GRAPH_SUCCESS);
}
/*
TEST_F(UtestGeNode, add_link_from) {
OpDescPtr desc_ptr = std::make_shared<OpDesc>("name", "type");
EXPECT_EQ(desc_ptr->AddInputDesc("x", GeTensorDesc(GeShape({1, 16, 16, 16}), FORMAT_NCHW)), GRAPH_SUCCESS);
@ -179,6 +179,7 @@ TEST_F(UtestGeNode, add_link_from) {
NodePtr n8 = graph_ptr1->AddNode(desc_ptr1);
EXPECT_EQ(n8->AddLinkFromForParse(n7), GRAPH_PARAM_INVALID);
}
*/
TEST_F(UtestGeNode, add_link_from_fail) {
OpDescPtr desc_ptr = std::make_shared<OpDesc>("name1", "type1");

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save