Reduced number of NVML function calls

This commit is contained in:
2025-02-21 10:59:31 -08:00
parent 46eb773820
commit b7d22ed9ac
5 changed files with 16 additions and 17 deletions
+3 -1
View File
@@ -24,7 +24,7 @@ char *header_start = "";
char *header_end = "";
static const char helpstring[] = "Available options:\n"
"--i2c N : Only probe I2C bus N instead of all (may help with stuttering with --watch)\n"
"--i2c N : Only probe I2C bus N instead of all (may help with stuttering or freezing when probing I2C devices)\n"
"--gpu N : Control only GPU N instead of all supported cards\n"
"--fan SPEED : Set all fans at once to SPEED (see below)\n"
"--fanN SPEED : Set fan N (0-3) to SPEED\n"
@@ -163,6 +163,8 @@ int main (int argc, char **argv)
/* NVML init */
#ifdef USE_NVML
init_nvml();
for (int i = 0; i < gpu_count; i++)
get_nvml_handle(&gpus[i]);
#endif
/* PCI init for VRAM/hotspot temps */