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

Function NewSession

tensorflow/core/common_runtime/session.cc:63–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63Session* NewSession(const SessionOptions& options) {
64 SessionFactory* factory;
65 Status s = SessionFactory::GetFactory(options, &factory);
66 if (!s.ok()) {
67 LOG(ERROR) << s;
68 return nullptr;
69 }
70 // Starts exporting metrics through a platform-specific monitoring API (if
71 // provided). For builds using "tensorflow/core/platform/default", this is
72 // currently a no-op.
73 session_created->GetCell()->Set(true);
74 monitoring::StartExporter();
75 Session* out_session;
76 s = NewSession(options, &out_session);
77 if (!s.ok()) {
78 LOG(ERROR) << "Failed to create session: " << s;
79 return nullptr;
80 }
81 return out_session;
82}
83
84Status NewSession(const SessionOptions& options, Session** out_session) {
85 SessionFactory* factory;

Callers 15

CreateSessionFunction · 0.70
TESTFunction · 0.70
TestHWAcceleratorFunction · 0.70
TESTFunction · 0.70
CreateSessionFunction · 0.70
TEST_FFunction · 0.70
TESTFunction · 0.70
FeedFetchBenchmarkHelperFunction · 0.70
initMethod · 0.50

Calls 5

StartExporterFunction · 0.85
okMethod · 0.45
SetMethod · 0.45
GetCellMethod · 0.45
NewSessionMethod · 0.45

Tested by 15

CreateSessionFunction · 0.56
TESTFunction · 0.56
TestHWAcceleratorFunction · 0.56
TESTFunction · 0.56
CreateSessionFunction · 0.56
TEST_FFunction · 0.56
TESTFunction · 0.56
FeedFetchBenchmarkHelperFunction · 0.56
initMethod · 0.40