fix ME+GE compile error
This commit is contained in:
parent
3289d7bb69
commit
01822c54d9
|
@ -38,7 +38,7 @@ set(MS_CCSRC_BUILD_PATH ${BUILD_PATH}/mindspore/mindspore/ccsrc)
|
|||
|
||||
if (ENABLE_GE)
|
||||
link_directories(${CMAKE_SOURCE_DIR}/third_party/ge/lib)
|
||||
else()
|
||||
elseif(ENABLE_D OR ENABLE_TESTCASES)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/dependency_graphengine.cmake)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -491,7 +491,7 @@ if (NOT ENABLE_GE)
|
|||
add_dependencies(add_ge_lib add_ms_lib)
|
||||
add_dependencies(add_ge_lib graph)
|
||||
add_dependencies(add_ge_lib ge_runtime)
|
||||
else()
|
||||
elseif(ENABLE_TESTCASES)
|
||||
add_custom_target(add_ge_lib ALL
|
||||
COMMAND cp ${MS_CCSRC_BUILD_PATH}/../../graphengine/src/common/graph/libgraph.so ${MS_LIB_PATH}
|
||||
COMMAND cp ${CMAKE_SOURCE_DIR}/graphengine/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR}/libslog.so ${MS_LIB_PATH}
|
||||
|
|
|
@ -429,20 +429,11 @@ std::shared_ptr<py::object> DoExecGraph(const FuncGraphPtr& graph, const std::ve
|
|||
|
||||
std::shared_ptr<py::object> ret = nullptr;
|
||||
|
||||
#ifdef ENABLE_GE
|
||||
AnfNodePtr root = graph->get_return();
|
||||
MS_EXCEPTION_IF_NULL(root);
|
||||
AbstractBasePtr output = root->abstract();
|
||||
AnfNodePtr output_node = graph->get_return()->input(1);
|
||||
MS_EXCEPTION_IF_NULL(output_node);
|
||||
size_t count = 0;
|
||||
py::object oj = StructureOutput(output, outputs, &count);
|
||||
py::object oj = StructureOutput(output_node, outputs, &count);
|
||||
ret = std::make_shared<py::object>(oj);
|
||||
#else
|
||||
if (outputs.size() == 1) {
|
||||
ret = std::make_shared<py::object>(outputs[0]);
|
||||
} else {
|
||||
ret = std::make_shared<py::object>(outputs);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -495,7 +486,7 @@ py::object ExecDFGraph(const std::map<std::string, ExecutorInfoPtr>& info, const
|
|||
|
||||
FuncGraphPtr anf_graph = info.at(phase)->func_graph;
|
||||
|
||||
#if (!defined ENABLE_GE) || (defined ENABLE_INFER)
|
||||
#ifdef ENABLE_INFER
|
||||
// Now don't use the graph because the exec ge function don't take effect
|
||||
MS_EXCEPTION_IF_NULL(info.at(phase)->func_graph);
|
||||
if (ENABLE_TRAIN != info.at(phase)->func_graph->flags()["training"]) {
|
||||
|
|
Loading…
Reference in New Issue