| 224 | } |
| 225 | |
| 226 | Status QueueRunner::RealRun(Session* sess, const string& op, |
| 227 | bool update_costs) { |
| 228 | Status s; |
| 229 | if (update_costs && cg_mu_) { |
| 230 | RunMetadata metadata; |
| 231 | s = sess->Run(run_options_, {}, {}, {op}, nullptr, &metadata); |
| 232 | mutex_lock l(*cg_mu_); |
| 233 | cost_graph_->Swap(metadata.mutable_cost_graph()); |
| 234 | } else { |
| 235 | s = sess->Run({}, {}, {op}, nullptr); |
| 236 | } |
| 237 | return s; |
| 238 | } |
| 239 | |
| 240 | } // namespace tensorflow |
nothing calls this directly
no test coverage detected