diff --git a/ge/hybrid/executor/subgraph_context.cc b/ge/hybrid/executor/subgraph_context.cc index 0889e51e..0fa112a4 100644 --- a/ge/hybrid/executor/subgraph_context.cc +++ b/ge/hybrid/executor/subgraph_context.cc @@ -17,6 +17,7 @@ #include "subgraph_context.h" #include "common/debug/log.h" +#include "hybrid/executor/hybrid_model_executor.h" namespace ge { namespace hybrid { diff --git a/ge/hybrid/executor/subgraph_context.h b/ge/hybrid/executor/subgraph_context.h index 3eb66b02..8ce33f23 100644 --- a/ge/hybrid/executor/subgraph_context.h +++ b/ge/hybrid/executor/subgraph_context.h @@ -20,7 +20,7 @@ #include #include "hybrid/common/tensor_value.h" -#include "hybrid/executor/hybrid_model_executor.h" +#include "hybrid/executor/hybrid_execution_context.h" #include "hybrid/executor/node_state.h" #include "hybrid/executor/node_done_manager.h" #include "hybrid/model/graph_item.h" @@ -49,8 +49,8 @@ class SubgraphContext { private: friend class TaskContext; - const GraphExecutionContext *execution_context_; const GraphItem *graph_item_; + const GraphExecutionContext *execution_context_; std::mutex mu_; std::vector all_inputs_; std::vector all_outputs_; diff --git a/ge/hybrid/executor/subgraph_executor.cc b/ge/hybrid/executor/subgraph_executor.cc index b59f1acb..30a99ac4 100644 --- a/ge/hybrid/executor/subgraph_executor.cc +++ b/ge/hybrid/executor/subgraph_executor.cc @@ -40,7 +40,7 @@ SubgraphExecutor::~SubgraphExecutor() { Status SubgraphExecutor::Init(const std::vector &inputs, const std::vector &input_desc) { - subgraph_context_.reset(new(std::nothrow)SubgraphContext(graph_item_)); + subgraph_context_.reset(new(std::nothrow)SubgraphContext(graph_item_, context_)); GE_CHECK_NOTNULL(subgraph_context_); GE_CHK_STATUS_RET(subgraph_context_->Init(), "[%s] Failed to init subgraph context.", graph_item_->GetName().c_str());