提交 28482f81 编写于 作者: T tangwei12

bug fix

上级 6abf0769
...@@ -269,16 +269,16 @@ void ListenAndServOp::RunImpl(const framework::Scope &scope, ...@@ -269,16 +269,16 @@ void ListenAndServOp::RunImpl(const framework::Scope &scope,
rpc_service_->RegisterRPC(detail::kRequestCheckpoint, rpc_service_->RegisterRPC(detail::kRequestCheckpoint,
request_checkpoint_handler_.get()); request_checkpoint_handler_.get());
auto *optimize_block = Attr<framework::BlockDesc *>(kOptimizeBlock);
auto *program = optimize_block->Program();
framework::Executor executor(dev_place);
std::shared_ptr<framework::ExecutorPrepareContext> ckpt_pre_context = nullptr; std::shared_ptr<framework::ExecutorPrepareContext> ckpt_pre_context = nullptr;
if (checkpoint_notify_id != -1) { if (checkpoint_notify_id != -1) {
auto ctx = executor.Prepare(*program, checkpoint_notify_id); auto ctx = executor.Prepare(*program, checkpoint_notify_id);
ckpt_pre_context = std::move(ctx); ckpt_pre_context = std::move(ctx);
} }
auto *optimize_block = Attr<framework::BlockDesc *>(kOptimizeBlock);
auto *program = optimize_block->Program();
framework::Executor executor(dev_place);
// prepare for prefetch // prepare for prefetch
std::vector<int> prefetch_block_id_list; std::vector<int> prefetch_block_id_list;
std::unordered_map<int, std::string> block_id_to_prefetch_var_name; std::unordered_map<int, std::string> block_id_to_prefetch_var_name;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册