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

Method RunCallable

tensorflow/core/distributed_runtime/master_session.cc:2269–2294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2267}
2268
2269Status MasterSession::RunCallable(CallOptions* opts,
2270 const RunCallableRequest& req,
2271 RunCallableResponse* resp) {
2272 UpdateLastAccessTime();
2273 ReffedClientGraph* callable;
2274 {
2275 mutex_lock l(mu_);
2276 if (closed_) {
2277 return errors::FailedPrecondition("Session is closed.");
2278 }
2279 int64 handle = req.handle();
2280 if (handle >= next_callable_handle_) {
2281 return errors::InvalidArgument("No such callable handle: ", handle);
2282 }
2283 auto iter = callables_.find(req.handle());
2284 if (iter == callables_.end()) {
2285 return errors::InvalidArgument(
2286 "Attempted to run callable after handle was released: ", handle);
2287 }
2288 callable = iter->second;
2289 callable->Ref();
2290 ++num_running_;
2291 }
2292 core::ScopedUnref unref_callable(callable);
2293 return DoRunCallable(opts, callable, req, resp);
2294}
2295
2296Status MasterSession::ReleaseCallable(const ReleaseCallableRequest& req,
2297 ReleaseCallableResponse* resp) {

Callers

nothing calls this directly

Calls 6

FailedPreconditionFunction · 0.85
InvalidArgumentFunction · 0.85
handleMethod · 0.45
findMethod · 0.45
endMethod · 0.45
RefMethod · 0.45

Tested by

no test coverage detected