diff --git a/ge/graph/build/graph_builder.cc b/ge/graph/build/graph_builder.cc index 143d5550..efe942ac 100644 --- a/ge/graph/build/graph_builder.cc +++ b/ge/graph/build/graph_builder.cc @@ -200,6 +200,12 @@ Status GraphBuilder::Build(ComputeGraphPtr &comp_graph, std::vectorGetGraphUnknownFlag()) { + if (std::getenv("EXPERIMENTAL_DYNAMIC_PARTITION") == nullptr) { + GELOGE(FAILED, "Environment variable EXPERIMENTAL_DYNAMIC_PARTITION is missing, which is " + "required by current dynamic model[%s], please retry with environment variable " + "\"export EXPERIMENTAL_DYNAMIC_PARTITION=1\"", comp_graph->GetName().c_str()); + return FAILED; + } GE_CHK_STATUS_RET( BuildForDynamicShapeGraph(comp_graph, subgraph_ptr_list, ge_root_model_ptr, ge_model_ptr, session_id), "Build for dynamic shape graph failed.");