Commit 69478776 by xiaotong

updates

parent c2a40cf0
......@@ -509,14 +509,11 @@ void XLeader::RunUpdate(XConfig * config, XOptimizer * optimizer, const int * ac
CheckNTErrors(jobQueues.count == serverModel.paramNum, "Incompatiable model!");
/* counts how many member models are collect for each parameters */
/* counts how many member models are collected for each parameter */
int * finishedCount = new int[serverModel.paramNum];
memset(finishedCount, 0, sizeof(int) * serverModel.paramNum);
/* This is a simple implementation of the wait-and-collect process. But
there is a risk that some models are not available, that is, the
loop would never stop. A solution might be that we force the loop
to break after waiting for a short time. */
/* This is a simple implementation of the do-and-wait process */
while (1) {
for (int j = 0; j < serverModel.paramNum; j++) {
......@@ -569,7 +566,7 @@ void XLeader::RunUpdate(XConfig * config, XOptimizer * optimizer, const int * ac
}
}
/* the collection finishes if all data tensors are processed */
/* finishes if all data tensors are processed */
if (finished == serverModel.paramNum * members.count)
break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论