Remove old implementation of loading libnvidia-ml.so. This update addresses the issue where a false negative return occurs if libnvidia-ml is not found before checking for alternative library names.

This commit is contained in:
jkre 2023-12-26 23:59:28 +01:00
parent ad14554f32
commit 78122fd3e2

View file

@ -948,13 +948,6 @@ namespace Gpu {
bool init() {
if (initialized) return false;
//? Dynamic loading & linking
nvml_dl_handle = dlopen("libnvidia-ml.so", RTLD_LAZY);
if (!nvml_dl_handle) {
Logger::info(std::string("Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: ") + dlerror());
return false;
}
//? Try possible library names for libnvidia-ml.so
const array libNvAlts = {
"libnvidia-ml.so",