| 101 | namespace xla { |
| 102 | |
| 103 | StatusOr<LocalDeviceState*> Device::GetLocalDeviceState() const { |
| 104 | if (local_device_state_) { |
| 105 | return local_device_state_.get(); |
| 106 | } |
| 107 | return InvalidArgument("Device %s is not a local device.", DebugString()); |
| 108 | } |
| 109 | |
| 110 | std::string Device::DebugString() const { |
| 111 | return absl::StrCat(platform_name(), ":", id()); |
no test coverage detected