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

Method RunStep

tensorflow/core/distributed_runtime/master.cc:536–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534}
535
536void Master::RunStep(CallOptions* opts, const RunStepRequestWrapper* req,
537 MutableRunStepResponseWrapper* resp, MyClosure done) {
538 Status s = recent_request_ids_.TrackUnique(req->request_id(),
539 "RunStep (Master)", req);
540 if (!s.ok()) {
541 done(s);
542 return;
543 }
544 auto start_time = env_->env->NowMicros();
545 auto session = FindMasterSession(req->session_handle());
546 if (session == nullptr) {
547 done(errors::Aborted("Session ", req->session_handle(), " is not found."));
548 return;
549 }
550
551 SchedClosure([this, start_time, session, opts, req, resp, done]() {
552 Status status = session->Run(opts, *req, resp);
553 session->Unref();
554 uint64 done_time = env_->env->NowMicros();
555 done(status);
556 mutex_lock l(mu_);
557 last_1000_steps_.AddValue((done_time - start_time) / 1e9);
558 ++step_count_;
559 });
560}
561
562void Master::CloseSession(const CloseSessionRequest* req,
563 CloseSessionResponse* resp, MyClosure done) {

Callers

nothing calls this directly

Calls 9

SchedClosureFunction · 0.85
request_idMethod · 0.80
session_handleMethod · 0.80
TrackUniqueMethod · 0.60
okMethod · 0.45
NowMicrosMethod · 0.45
RunMethod · 0.45
UnrefMethod · 0.45
AddValueMethod · 0.45

Tested by

no test coverage detected