Code refactoring and cleanup.

PiperOrigin-RevId: 322600036
Change-Id: I27a79a6da45b40f1562c38d0f670bf007b458803
This commit is contained in:
Henry Tan 2020-07-22 10:14:51 -07:00 committed by TensorFlower Gardener
parent 19589460b9
commit a1cec7e442
2 changed files with 3 additions and 4 deletions

View File

@ -390,10 +390,12 @@ Status TpuCompileOpKernelCommon::CompileTFFunctionToHlo(
<< " seconds to give time for TPUCompileOp to finished.";
env->SleepForMicroseconds(kSleepSeconds * 1000000);
if (done->load()) {
// If the TPUCompileOp has finished, then terminate peacefully.
// If the TpuCompileOp has finished, then terminate peacefully.
return;
}
LOG(ERROR) << "Aborting process due to cancelled TpuCompileOp. This "
<< "termination is to ensure a consistent state.";
std::exit(42);
}

View File

@ -54,9 +54,6 @@ Status DynamicShapesToTensorShapes(const OpInputList& dynamic_shapes,
std::vector<TensorShape>* shapes);
Status DynamicShapesToTensorShapes(const InputList& dynamic_shapes,
std::vector<TensorShape>* shapes);
// A callback called on exit.
void LogAndExit(int code);
} // namespace tpu
} // namespace tensorflow