| 91 | Platform::Id ROCmPlatform::id() const { return rocm::kROCmPlatformId; } |
| 92 | |
| 93 | int ROCmPlatform::VisibleDeviceCount() const { |
| 94 | // Throw away the result - it logs internally, and this [containing] function |
| 95 | // isn't in the path of user control. It's safe to call this > 1x. |
| 96 | |
| 97 | if (!gpu::GpuDriver::Init().ok()) { |
| 98 | return -1; |
| 99 | } |
| 100 | |
| 101 | return GpuDriver::GetDeviceCount(); |
| 102 | } |
| 103 | |
| 104 | const string& ROCmPlatform::Name() const { return name_; } |
| 105 |