|
|
|
@@ -25,6 +25,7 @@ |
|
|
|
#include "ir/dtype.h" |
|
|
|
#include "pipeline/jit/static_analysis/prim.h" |
|
|
|
#include "pipeline/jit/parse/resolve.h" |
|
|
|
#include "debug/trace.h" |
|
|
|
|
|
|
|
namespace mindspore { |
|
|
|
namespace validator { |
|
|
|
@@ -138,6 +139,7 @@ void ValidateValueNode(const AnfNodePtr &node) { |
|
|
|
if (IsValueNode<parse::InterpretedObject>(node)) { |
|
|
|
MS_LOG(EXCEPTION) |
|
|
|
<< "Should not use Python object in runtime, node: " << node->DebugString() |
|
|
|
<< ". \nLine: " << trace::GetDebugInfo(node->debug_info()) |
|
|
|
<< "\n\nWe suppose all nodes generated by JIT Fallback would not return to outside of graph. " |
|
|
|
<< "For more information about JIT Fallback, please refer to the FAQ at https://www.mindspore.cn."; |
|
|
|
} |
|
|
|
@@ -163,7 +165,8 @@ void Validate(const FuncGraphPtr &fg) { |
|
|
|
MS_EXCEPTION_IF_NULL(mgr); |
|
|
|
AnfNodeSet &all_nodes = mgr->all_nodes(); |
|
|
|
for (auto &node : all_nodes) { |
|
|
|
if (IsPrimitiveCNode(node, prim::kPrimDepend)) { |
|
|
|
TraceGuard guard(std::make_shared<TraceCopy>(node->debug_info())); |
|
|
|
while (IsPrimitiveCNode(node, prim::kPrimReturn) || IsPrimitiveCNode(node, prim::kPrimDepend)) { |
|
|
|
node = node->cast<CNodePtr>()->input(1); |
|
|
|
} |
|
|
|
if (IsValueNode<ValueTuple>(node)) { |
|
|
|
|