We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cb2110 commit f155094Copy full SHA for f155094
OptiScaler/misc/IdentifyGpu.cpp
@@ -344,6 +344,14 @@ std::vector<GpuInformation> IdentifyGpu::getAllGpus()
344
static std::vector<GpuInformation> cache = []() { return checkGpuInfo(); }();
345
skip = false;
346
347
+ // Retry getting the GPU info in case it failed
348
+ static std::mutex mutex;
349
+ if (cache.size() == 0 || (cache.size() > 0 && cache[0].deviceId == VendorId::Invalid))
350
+ {
351
+ std::scoped_lock lock(mutex);
352
+ cache = checkGpuInfo();
353
+ }
354
+
355
return cache;
356
}
357
0 commit comments