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

Method RecordPRun

tensorflow/python/client/session_ref.cc:276–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274 }
275
276 Status RecordPRun(Session* session, const string& handle,
277 const std::vector<std::pair<string, Tensor> >& inputs,
278 const std::vector<string>& output_names,
279 std::vector<Tensor>* outputs) {
280 ReplayOp op;
281 RunStepRequest* req = op.mutable_run_step();
282 RunStepResponse* resp = op.mutable_run_step_response();
283 req->set_session_handle(SessionToHandle(session));
284
285 // Mark this step as a partial run for replay.
286 req->set_partial_run_handle(handle);
287 for (auto& input : inputs) {
288 auto* feed = req->add_feed();
289 feed->set_name(input.first);
290 input.second.AsProtoField(feed->mutable_tensor());
291 }
292
293 for (auto& output : output_names) {
294 req->add_fetch(output);
295 }
296
297 RUN_WITH_TIMESTAMP(PRun, handle, inputs, output_names, outputs);
298
299 for (size_t i = 0; i < outputs->size(); ++i) {
300 const Tensor& tensor = (*outputs)[i];
301 NamedTensorProto* tproto = resp->add_tensor();
302 tensor.AsProtoField(tproto->mutable_tensor());
303 tproto->set_name(output_names[i]);
304 }
305
306 return Flush(op);
307 }
308
309 Status RecordMakeCallable(Session* session,
310 const CallableOptions& callable_options,

Callers

nothing calls this directly

Calls 9

SessionToHandleFunction · 0.85
set_session_handleMethod · 0.80
AsProtoFieldMethod · 0.80
add_tensorMethod · 0.80
add_feedMethod · 0.45
set_nameMethod · 0.45
add_fetchMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected