diff --git a/cpp/src/nvml_wrap.cpp b/cpp/src/nvml_wrap.cpp index 49b3e8170..4e32fac51 100644 --- a/cpp/src/nvml_wrap.cpp +++ b/cpp/src/nvml_wrap.cpp @@ -39,7 +39,7 @@ template T LoadNvmlSymbol(const char* name) { void* symbol = dlsym(nvml_handle, name); if (!symbol) { - fprintf(stderr, "Failed to load NVML symbol %s: %s\n", name, dlerror()); + return nullptr; } return reinterpret_cast(symbol); }