forked from mindspore-Ecosystem/mindspore
!14660 fix the ge compilation problem.
From: @wangshuide2020 Reviewed-by: @liangchenghui,@wuxuejian Signed-off-by: @liangchenghui
This commit is contained in:
commit
13305bd950
|
@ -23,7 +23,7 @@ option(ENABLE_PYTHON "Enable python" ON)
|
|||
option(ENABLE_ACL "enable acl" OFF)
|
||||
option(ENABLE_GLIBCXX "enable_glibcxx" OFF)
|
||||
|
||||
if(NOT ENABLE_D AND NOT ENABLE_TESTCASES AND NOT ENABLE_ACL)
|
||||
if(NOT ENABLE_D AND NOT ENABLE_TESTCASES AND NOT ENABLE_ACL AND NOT ENABLE_GE)
|
||||
set(ENABLE_GLIBCXX ON)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ if(ENABLE_GE)
|
|||
else()
|
||||
target_link_libraries(mindspore ge_client)
|
||||
endif()
|
||||
target_link_libraries(mindspore graph tsdclient datatransfer)
|
||||
target_link_libraries(mindspore graph tsdclient datatransfer ascendcl runtime)
|
||||
endif()
|
||||
|
||||
if(ENABLE_D)
|
||||
|
|
|
@ -80,7 +80,7 @@ using mindspore::abstract::AbstractTensorPtr;
|
|||
using mindspore::abstract::AbstractTuple;
|
||||
using mindspore::abstract::AbstractTuplePtr;
|
||||
|
||||
#if (ENABLE_GE || ENABLE_D)
|
||||
#if (ENABLE_D)
|
||||
using mindspore::device::ascend::ProfilingManager;
|
||||
#endif
|
||||
|
||||
|
@ -1109,7 +1109,7 @@ void InitHccl() {
|
|||
(void)context::OpenTsd(ms_context);
|
||||
}
|
||||
#endif
|
||||
#if (ENABLE_GE || ENABLE_D)
|
||||
#if (ENABLE_D)
|
||||
if (!ProfilingManager::GetInstance().IsProfiling()) {
|
||||
ProfilingManager::GetInstance().SetHcclEnabledBefProfilingEnabled();
|
||||
}
|
||||
|
|
|
@ -16,8 +16,11 @@ else()
|
|||
endif()
|
||||
|
||||
if(ENABLE_D)
|
||||
file(GLOB_RECURSE D_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "ascend/*.cc" "kernel_adjust.cc"
|
||||
"../../minddata/dataset/engine/tdt/tdt_handle.cc")
|
||||
file(GLOB_RECURSE D_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "ascend/*.cc" "kernel_adjust.cc")
|
||||
endif()
|
||||
if(ENABLE_TDTQUE)
|
||||
file(GLOB_RECURSE TDT_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
"../../minddata/dataset/engine/tdt/tdt_handle.cc")
|
||||
endif()
|
||||
|
||||
if(ENABLE_CPU)
|
||||
|
@ -75,4 +78,4 @@ endif()
|
|||
list(REMOVE_ITEM D_SRC_LIST "ascend/profiling/profiling_callback_register.cc")
|
||||
set_property(SOURCE ${DEVICE_SRC_LIST} ${D_SRC_LIST} ${CPU_SRC_LIST}
|
||||
PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_DEVICE)
|
||||
add_library(_mindspore_runtime_device_obj OBJECT ${DEVICE_SRC_LIST} ${D_SRC_LIST} ${CPU_SRC_LIST})
|
||||
add_library(_mindspore_runtime_device_obj OBJECT ${DEVICE_SRC_LIST} ${D_SRC_LIST} ${CPU_SRC_LIST} ${TDT_SRC_LIST})
|
||||
|
|
Loading…
Reference in New Issue