| 233 | |
| 234 | |
| 235 | void printGpuInfo() { |
| 236 | |
| 237 | using namespace printer_substrings; |
| 238 | |
| 239 | /// @todo below: |
| 240 | /// - GPU compute capability |
| 241 | /// - GPU #SVMs etc |
| 242 | |
| 243 | // must not query any GPU facilities unless confirmed compiled and available |
| 244 | bool isComp = gpu_isGpuCompiled(); |
| 245 | bool isGpu = isComp && gpu_isGpuAvailable(); |
| 246 | |
| 247 | print_table( |
| 248 | "gpu", { |
| 249 | {"numGpus", isComp? printer_toStr(gpu_getNumberOfLocalGpus()) : na}, |
| 250 | {"gpuDirect", isGpu? printer_toStr(gpu_isDirectGpuCommPossible()) : na}, |
| 251 | {"gpuMemPools", isGpu? printer_toStr(gpu_doesGpuSupportMemPools()) : na}, |
| 252 | {"gpuMemory", isGpu? printer_getMemoryWithUnitStr(gpu_getTotalMemoryInBytes()) + pg : na}, |
| 253 | {"gpuMemoryFree", isGpu? printer_getMemoryWithUnitStr(gpu_getCurrentAvailableMemoryInBytes()) + pg : na}, |
| 254 | {"gpuCache", isGpu? printer_getMemoryWithUnitStr(gpu_getCacheMemoryInBytes()) + pg : na}, |
| 255 | }); |
| 256 | } |
| 257 | |
| 258 | |
| 259 | void printDistributionInfo() { |
no test coverage detected