Return the total num of free GPUs
| 45 | |
| 46 | /// Return the total num of free GPUs |
| 47 | const vector<int> Platform::GetGPUIDs() { |
| 48 | vector<int> gpus; |
| 49 | int count = Platform::GetNumGPUs(); |
| 50 | for (int i = 0; i < count; i++) { |
| 51 | if (Platform::CheckDevice(i)) { |
| 52 | gpus.push_back(i); |
| 53 | } |
| 54 | } |
| 55 | return gpus; |
| 56 | } |
| 57 | |
| 58 | const std::pair<size_t, size_t> Platform::GetGPUMemSize(const int device) { |
| 59 | std::pair<size_t, size_t> ret{0, 0}; |