diff --git a/paddle/fluid/framework/details/bind_threaded_ssa_graph_executor.cc b/paddle/fluid/framework/details/bind_threaded_ssa_graph_executor.cc index 6d3c52dabbd0d8b0a6aab53893c3b5256f71a28e..6ce1eac2e30d24e3752ba08d77637005f5360c01 100644 --- a/paddle/fluid/framework/details/bind_threaded_ssa_graph_executor.cc +++ b/paddle/fluid/framework/details/bind_threaded_ssa_graph_executor.cc @@ -131,13 +131,13 @@ FetchResultType BindThreadedSSAGraphExecutor::RunMainStream( platform::XPUPlace cur_place; std::size_t cur_count = 0; - while (cur_count < op_deps_.size()) { + while (cur_count < op_deps->size()) { cur_count++; auto cur_op = ready_ops->Pop(); // when execption, get cur_op == nullptr if (cur_op == nullptr) { std::lock_guard lock(mutex_); - exec_op_count_ = op_deps_.size(); + exec_op_count_ = op_deps->size(); break; } auto dev_ctxes_ = cur_op->DeviceContext(); @@ -153,7 +153,7 @@ FetchResultType BindThreadedSSAGraphExecutor::RunMainStream( } { std::unique_lock lock(mutex_); - cv_.wait(lock, [&] { return exec_op_count_ >= op_deps_.size(); }); + cv_.wait(lock, [&] { return exec_op_count_ >= op_deps->size(); }); } if (exception_.IsCaught()) {