| 63 | } |
| 64 | |
| 65 | Status Run() override { |
| 66 | const Status status = EagerKernelExecute( |
| 67 | ctx_, inputs_, kernel_, maybe_stats_.get(), maybe_step_stats_, |
| 68 | graph_collector_, cancellation_manager_, absl::MakeSpan(retvals_)); |
| 69 | if (!status.ok()) { |
| 70 | Abort(status); |
| 71 | return status; |
| 72 | } |
| 73 | |
| 74 | // If status is ok, EagerKernelExecute would have called SetTensor on |
| 75 | // all the output handles. |
| 76 | |
| 77 | for (auto handle : retvals_) { |
| 78 | handle->Unref(); |
| 79 | } |
| 80 | |
| 81 | for (auto handle : inputs_) { |
| 82 | handle->Unref(); |
| 83 | } |
| 84 | |
| 85 | return status; |
| 86 | } |
| 87 | |
| 88 | void Abort(Status status) override { |
| 89 | for (auto handle : retvals_) { |
nothing calls this directly
no test coverage detected