diff --git a/CMakeLists.txt b/CMakeLists.txt index e67b5074..6b95e1ed 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,8 +79,6 @@ if (ENABLE_OPEN_SRC) find_module(ascend_hal_stub libascend_hal.so ${GE_LIB_PATH}) find_module(msprofiler_fwk_ext libmsprofiler_fwk.a ${GE_LIB_PATH}) #find_module(ascendcl_static libascendcl.a ${GE_LIB_PATH}) - elseif(ENABLE_GE_COV OR ENABLE_GE_UT) - add_subdirectory(tests) else() find_module(slog libalog.so ${ASCEND_ATC_DIR}) find_module(static_mmpa libmmpa.a ${ASCEND_ATC_DIR}) @@ -95,7 +93,7 @@ if (ENABLE_OPEN_SRC) elseif(PLATFORM STREQUAL "inference") find_module(adump_server libadump_server.a ${ASCEND_ACL_DIR}) find_module(runtime libruntime.so ${ASCEND_ACL_DIR}) - find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR}) + find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR}) find_module(msprofiler_ext libmsprofiler.a ${ASCEND_ACL_DIR}) if(PRODUCT STREQUAL "flr3") elseif(PRODUCT STREQUAL "flr1") @@ -106,17 +104,21 @@ if (ENABLE_OPEN_SRC) find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}) endif() elseif(PLATFORM STREQUAL "all") - find_module(adump_server libadump_server.a ${ASCEND_RUNTIME_DIR}) - find_module(runtime libruntime.so ${ASCEND_RUNTIME_DIR}) + find_module(adump_server libadump_server.a ${ASCEND_RUNTIME_DIR}) + find_module(runtime libruntime.so ${ASCEND_RUNTIME_DIR}) find_module(msprofiler_fwk_ext libmsprofiler_fwk.a ${ASCEND_RUNTIME_DIR}) - find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}) - find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR}) - find_module(msprofiler_ext libmsprofiler.a ${ASCEND_ACL_DIR}) + find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver) + find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR}) + find_module(msprofiler_ext libmsprofiler.a ${ASCEND_ACL_DIR}) else() message(STATUS "PLATFORM param is invalid, should be train or inference, you choose nothing!") endif() endif() + if(ENABLE_GE_COV OR ENABLE_GE_UT) + add_subdirectory(tests) + endif() + set(METADEF_DIR ${CMAKE_CURRENT_LIST_DIR}/metadef) set(PARSER_DIR ${CMAKE_CURRENT_LIST_DIR}/parser) set(GE_DEPEND_DIR ${CMAKE_CURRENT_LIST_DIR}/..) diff --git a/ge/host_cpu_engine/CMakeLists.txt b/ge/host_cpu_engine/CMakeLists.txt index 8d84ee28..565c941e 100644 --- a/ge/host_cpu_engine/CMakeLists.txt +++ b/ge/host_cpu_engine/CMakeLists.txt @@ -209,7 +209,7 @@ set_target_properties(atc_host_cpu_opskernel_builder PROPERTIES ) ############ libhost_cpu_opskernel_builder.a ############ -add_library(host_cpu_opskernel_builder_static STATIC ${CPU_OPS_KERNEL_LIST}) +add_library(host_cpu_opskernel_builder_static STATIC ${CPU_OPS_KERNEL_LIST} ${PROTO_HDRS}) target_compile_options(host_cpu_opskernel_builder_static PRIVATE -Werror diff --git a/ge/ir_build/option_utils.cc b/ge/ir_build/option_utils.cc index c23da519..4e52a08c 100755 --- a/ge/ir_build/option_utils.cc +++ b/ge/ir_build/option_utils.cc @@ -80,12 +80,12 @@ static bool StringToLongNoThrow(const string &str, long &val) { try { val = std::stol(str); return true; - } catch (const std::invalid_argument) { + } catch (const std::invalid_argument &) { REPORT_INPUT_ERROR("E10048", std::vector({"shape_range", "reason", "sample"}), std::vector({str, kShapeRangeValueConvertError, kInputShapeRangeSample3})); GELOGE(PARAM_INVALID, "[Parse][Parameter] str:%s to long failed, reason: %s, correct sample is %s.", str.c_str(), kShapeRangeValueConvertError, kInputShapeRangeSample3); - } catch (const std::out_of_range) { + } catch (const std::out_of_range &) { REPORT_INPUT_ERROR("E10048", std::vector({"shape_range", "reason", "sample"}), std::vector({str, kShapeRangeValueConvertError, kInputShapeRangeSample3})); GELOGE(PARAM_INVALID, "[Parse][Parameter] str:%s to long failed, reason: %s, correct sample is %s.", diff --git a/tests/depends/cce/CMakeLists.txt b/tests/depends/cce/CMakeLists.txt index 7550c63f..448ff995 100644 --- a/tests/depends/cce/CMakeLists.txt +++ b/tests/depends/cce/CMakeLists.txt @@ -65,6 +65,7 @@ set(SRCS "${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/format_refiner.cc" "${GE_CODE_DIR}/metadef/graph/ge_tensor.cc" "${GE_CODE_DIR}/metadef/graph/opsproto/opsproto_manager.cc" )