未验证 提交 11b8646b 编写于 作者: T TeslaZhao 提交者: GitHub

Merge pull request #1763 from TeslaZhao/develop

新增Auto Padding 日志
......@@ -275,6 +275,7 @@ bool TaskExecutor<TaskT>::move_task_to_batch(
}
TaskT* previous_task = nullptr;
int padding_task_count = 0;
while (!_task_queue.empty()) {
TaskT* task = _task_queue.front();
......@@ -327,6 +328,7 @@ bool TaskExecutor<TaskT>::move_task_to_batch(
if (batchTask.padding(task) != 2) {
break;
}
++padding_task_count;
size_t rem = batchTask.append_task(task);
previous_task = task;
if (task->rem <= 0) {
......@@ -334,6 +336,11 @@ bool TaskExecutor<TaskT>::move_task_to_batch(
}
if (rem <= 0) break;
}
if (padding_task_count > 1) {
LOG(INFO) << "Hit auto padding, merge " << padding_task_count
<< " tasks into 1 batch.";
}
LOG(INFO) << "Number of tasks remaining in _task_queue is"
<< _task_queue.size();
return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册