| 74 | } |
| 75 | |
| 76 | StatusOr<const AsyncExecution*> ExecutionTracker::Resolve( |
| 77 | const ExecutionHandle& handle) { |
| 78 | tensorflow::mutex_lock lock(execution_mutex_); |
| 79 | auto it = handle_to_execution_.find(handle.handle()); |
| 80 | if (it == handle_to_execution_.end()) { |
| 81 | return NotFound("no execution record for execution handle: %d", |
| 82 | handle.handle()); |
| 83 | } |
| 84 | return it->second.get(); |
| 85 | } |
| 86 | |
| 87 | } // namespace xla |