| 430 | } |
| 431 | |
| 432 | Status MasterSession::ReffedClientGraph::DoBuildPartitions( |
| 433 | PartitionOptions popts, ClientGraph* client_graph, |
| 434 | std::unordered_map<string, GraphDef>* out_partitions) { |
| 435 | if (popts.need_to_record_start_times) { |
| 436 | CostModel cost_model(true); |
| 437 | cost_model.InitFromGraph(client_graph->graph); |
| 438 | // TODO(yuanbyu): Use the real cost model. |
| 439 | // execution_state_->MergeFromGlobal(&cost_model); |
| 440 | SlackAnalysis sa(&client_graph->graph, &cost_model); |
| 441 | sa.ComputeAsap(&popts.start_times); |
| 442 | } |
| 443 | |
| 444 | // Partition the graph. |
| 445 | if (popts.tensor_fuse) { |
| 446 | return PartitionWithTensorFuse(popts, &client_graph->graph, out_partitions); |
| 447 | } |
| 448 | |
| 449 | return Partition(popts, &client_graph->graph, out_partitions); |
| 450 | } |
| 451 | |
| 452 | Status MasterSession::ReffedClientGraph::DoRegisterPartitions( |
| 453 | const PartitionOptions& popts, |
nothing calls this directly
no test coverage detected