MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / printGpuInfo

Function printGpuInfo

quest/src/api/environment.cpp:235–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233
234
235void 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
259void printDistributionInfo() {

Callers 1

reportQuESTEnvFunction · 0.85

Calls 11

gpu_isGpuCompiledFunction · 0.85
gpu_isGpuAvailableFunction · 0.85
print_tableFunction · 0.85
gpu_getNumberOfLocalGpusFunction · 0.85
printer_toStrFunction · 0.50

Tested by

no test coverage detected