未验证 提交 9f9d15e2 编写于 作者: L lilong12 提交者: GitHub

fix the bug of non-exit, test=develop (#27350)

上级 d773c6c9
......@@ -441,6 +441,7 @@ class SectionWorker : public DeviceWorker {
skip_vars_ = skip_vars;
}
static void ResetBatchId() { batch_id_ = 0; }
static void ResetThreadCompletedFlag() { threads_completed = false; }
static std::atomic<int> cpu_id_;
......
......@@ -251,6 +251,7 @@ void PipelineTrainer::Finalize() {
}
root_scope_->DropKids();
SectionWorker::ResetBatchId();
SectionWorker::ResetThreadCompletedFlag();
}
Scope* PipelineTrainer::GetWorkerScope(int thread_id) {
......
......@@ -196,7 +196,6 @@ void SectionWorker::TrainFiles() {
if (threads_completed) {
VLOG(3) << "thread " << thread_id_ << " completed.";
lk.unlock();
threads_completed = false;
return;
}
lk.unlock();
......@@ -459,7 +458,6 @@ void SectionWorker::TrainFilesWithProfiler() {
<< ", mean_time: " << op_total_time[i] / op_count[i];
}
VLOG(0) << "================================";
threads_completed = false;
return;
}
lk.unlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册