MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DoBuildPartitions

Method DoBuildPartitions

tensorflow/core/distributed_runtime/master_session.cc:432–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432Status 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
452Status MasterSession::ReffedClientGraph::DoRegisterPartitions(
453 const PartitionOptions& popts,

Callers

nothing calls this directly

Calls 4

PartitionWithTensorFuseFunction · 0.85
ComputeAsapMethod · 0.80
PartitionFunction · 0.50
InitFromGraphMethod · 0.45

Tested by

no test coverage detected