static */
| 321 | } |
| 322 | |
| 323 | /* static */ port::Status GpuDriver::GetDevice(int device_ordinal, |
| 324 | hipDevice_t* device) { |
| 325 | hipError_t res = tensorflow::wrap::hipDeviceGet(device, device_ordinal); |
| 326 | if (res == hipSuccess) { |
| 327 | return port::Status::OK(); |
| 328 | } |
| 329 | |
| 330 | return port::Status{ |
| 331 | port::error::INTERNAL, |
| 332 | absl::StrCat("failed call to hipDeviceGet: ", ToString(res))}; |
| 333 | } |
| 334 | |
| 335 | /* static */ bool GpuDriver::GetDeviceName(hipDevice_t device, |
| 336 | string* device_name) { |