Improving readability by using Cluster::NumWarmupSteps() instead of directly calling options_.config.graph_options().build_cost_model_after()

PiperOrigin-RevId: 256372140
This commit is contained in:
Daryl Ng 2019-07-03 08:27:29 -07:00 committed by TensorFlower Gardener
parent 9746ceaf48
commit ff4dd5cf1c

View File

@ -181,8 +181,7 @@ Status SingleMachine::Run(const GraphDef& graph_def,
}
// Warmup TensorFlow if needed
for (int i = 0;
i < options_.config.graph_options().build_cost_model_after(); ++i) {
for (int i = 0; i < NumWarmupSteps(); ++i) {
TF_RETURN_IF_ERROR(RunWithTimeout(feed, fetch, nullptr));
}
}