Log an error if nvmlDeviceGetUtilizationRates failed

This commit is contained in:
jackun 2022-02-04 16:50:51 +02:00
parent f61638c5e9
commit eefce24024
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

View File

@ -55,7 +55,10 @@ bool getNVMLInfo(){
nvml.nvmlDeviceGetPowerUsage(nvidiaDevice, &nvidiaPowerUsage);
deviceID = nvidiaPciInfo.pciDeviceId >> 16;
if (response == NVML_ERROR_NOT_SUPPORTED)
if (response == NVML_ERROR_NOT_SUPPORTED) {
if (nvmlSuccess)
SPDLOG_ERROR("nvmlDeviceGetUtilizationRates failed");
nvmlSuccess = false;
}
return nvmlSuccess;
}