GPU: support printing frequency in MHz

This commit is contained in:
李通洲
2024-07-17 14:52:35 +08:00
parent 46abc4f5f7
commit 408a2d731a
8 changed files with 14 additions and 15 deletions
+1 -5
View File
@@ -122,11 +122,7 @@ const char* ffDetectNvidiaGpuInfo(const FFGpuDriverCondition* cond, FFGpuDriverR
nvmlData.ffnvmlDeviceGetNumGpuCores(device, result.coreCount);
if (result.frequency)
{
uint32_t clockMHz;
if (nvmlData.ffnvmlDeviceGetMaxClockInfo(device, NVML_CLOCK_GRAPHICS, &clockMHz) == NVML_SUCCESS)
*result.frequency = clockMHz / 1000.;
}
nvmlData.ffnvmlDeviceGetMaxClockInfo(device, NVML_CLOCK_GRAPHICS, result.frequency);
return NULL;