Skip to content

Commit 9d21b5b

Browse files
Reduce the severity of Nvidia messages
The case when the library or CLI is not found is totally normal: info(). Also, when the library is found, but there are no GPUs is odd, but not broken: info().
1 parent c5dd598 commit 9d21b5b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

package/src/nvidiamon.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ nvidiamon::nvidiamon() {
105105

106106
valid = false;
107107
active_method = MonitorMethod::NONE;
108-
warning("Both NVML and nvidia-smi failed. NVIDIA monitoring disabled.");
108+
info("Both NVML and nvidia-smi failed. NVIDIA monitoring disabled.");
109109
}
110110

111111
nvidiamon::~nvidiamon() {
@@ -428,7 +428,7 @@ bool nvidiamon::test_nvidia_smi() {
428428
}
429429
nvidiamon::ngpus = gpus;
430430
if (gpus == 0) {
431-
warning("Executed 'nvidia-smi -L', but no GPUs found");
431+
info("Executed 'nvidia-smi -L', but no GPUs found");
432432
return false;
433433
} else if (gpus > 4) {
434434
warning(
@@ -444,7 +444,7 @@ bool nvidiamon::load_nvml_lib() {
444444
nvml_handle = dlopen("libnvidia-ml.so.1", RTLD_NOW);
445445
}
446446
if (!nvml_handle) {
447-
warning("Failed to load libnvidia-ml.so: " + std::string(dlerror()));
447+
info("Failed to load libnvidia-ml.so: " + std::string(dlerror()));
448448
return false;
449449
}
450450

@@ -515,7 +515,7 @@ bool nvidiamon::init_nvml() {
515515
}
516516

517517
if (gpus == 0) {
518-
warning("nvmlInit() succeeded but no GPUs found");
518+
info("nvmlInit() succeeded but no GPUs found");
519519
nvmlShutdown();
520520
return false;
521521
}

0 commit comments

Comments
 (0)