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

Method Create

tensorflow/core/distributed_runtime/master_session.cc:1481–1505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1479}
1480
1481Status MasterSession::Create(GraphDef&& graph_def,
1482 const WorkerCacheFactoryOptions& options) {
1483 if (session_opts_.config.use_per_session_threads() ||
1484 session_opts_.config.session_inter_op_thread_pool_size() > 0) {
1485 return errors::InvalidArgument(
1486 "Distributed session does not support session thread pool options.");
1487 }
1488 if (session_opts_.config.graph_options().place_pruned_graph()) {
1489 // TODO(b/29900832): Fix this or remove the option.
1490 LOG(WARNING) << "Distributed session does not support the "
1491 "place_pruned_graph option.";
1492 session_opts_.config.mutable_graph_options()->set_place_pruned_graph(false);
1493 }
1494
1495 GraphExecutionStateOptions execution_options;
1496 execution_options.device_set = devices_.get();
1497 execution_options.session_options = &session_opts_;
1498 {
1499 mutex_lock l(mu_);
1500 TF_RETURN_IF_ERROR(GraphExecutionState::MakeForBaseGraph(
1501 std::move(graph_def), execution_options, &execution_state_));
1502 }
1503 should_delete_worker_sessions_ = true;
1504 return CreateWorkerSessions(options);
1505}
1506
1507Status MasterSession::CreateWorkerSessions(
1508 const WorkerCacheFactoryOptions& options) {

Callers 3

TEST_FFunction · 0.45
CreateSessionMethod · 0.45
BM_HelperFunction · 0.45

Calls 2

InvalidArgumentFunction · 0.85
getMethod · 0.45

Tested by 2

TEST_FFunction · 0.36
BM_HelperFunction · 0.36