Browse Source

!127 fix ME + GE compile error

Merge pull request !127 from wangqiuliang/fix-ge-me-compile
tags/v0.2.0-alpha
mindspore-ci-bot Gitee 5 years ago
parent
commit
02ffce800c
3 changed files with 6 additions and 15 deletions
  1. +1
    -1
      CMakeLists.txt
  2. +1
    -1
      mindspore/ccsrc/CMakeLists.txt
  3. +4
    -13
      mindspore/ccsrc/pipeline/pipeline_ge.cc

+ 1
- 1
CMakeLists.txt View File

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



+ 1
- 1
mindspore/ccsrc/CMakeLists.txt View File

@@ -495,7 +495,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}


+ 4
- 13
mindspore/ccsrc/pipeline/pipeline_ge.cc View File

@@ -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…
Cancel
Save