Skip to content
Snippets Groups Projects
Commit 276cc942 authored by Yi Zhu's avatar Yi Zhu Committed by Will Zhang
Browse files

fix: clear key twice (#913)

parent 6f426b63
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,9 @@ void FixCpuDeviceNum() {
Global<CtrlClient>::Get()->PullKVT("cpu_device_num", &cpu_device_num);
}
OF_BARRIER();
Global<CtrlClient>::Get()->ClearKV("cpu_device_num");
if (Global<MachineCtx>::Get()->IsThisMachineMaster()) {
Global<CtrlClient>::Get()->ClearKV("cpu_device_num");
}
CHECK_GT(cpu_device_num, 0);
Global<JobDesc>::Get()->SetCpuDeviceNum(cpu_device_num);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment