| 571 | } |
| 572 | |
| 573 | Status XlaDevice::RefreshStatus() { |
| 574 | std::shared_ptr<se::Stream> stream; |
| 575 | { |
| 576 | mutex_lock lock(mu_); |
| 577 | stream = stream_; |
| 578 | } |
| 579 | if (!stream) { |
| 580 | return Status::OK(); |
| 581 | } |
| 582 | Status status = stream->RefreshStatus(); |
| 583 | if (!status.ok()) { |
| 584 | // Ignore errors from HandleDeviceError, since by definition the status is |
| 585 | // already non-ok, so there's nothing extra to report if HandleDeviceError |
| 586 | // itself returns an error. |
| 587 | HandleDeviceError().IgnoreError(); |
| 588 | } |
| 589 | return status; |
| 590 | } |
| 591 | |
| 592 | XlaDeviceOpRegistrations* RegisterXlaDeviceKernels(const char* device, |
| 593 | const char* jit_device) { |
no test coverage detected