@@ -10,6 +10,7 @@ struct FFNvmlData {
1010 FF_LIBRARY_SYMBOL (nvmlDeviceGetPciInfo_v3 )
1111 FF_LIBRARY_SYMBOL (nvmlDeviceGetTemperature )
1212 FF_LIBRARY_SYMBOL (nvmlDeviceGetMemoryInfo_v2 )
13+ FF_LIBRARY_SYMBOL (nvmlDeviceGetMemoryInfo )
1314 FF_LIBRARY_SYMBOL (nvmlDeviceGetNumGpuCores )
1415 FF_LIBRARY_SYMBOL (nvmlDeviceGetMaxClockInfo )
1516 FF_LIBRARY_SYMBOL (nvmlDeviceGetUtilizationRates )
@@ -36,6 +37,7 @@ const char* ffDetectNvidiaGpuInfo(const FFGpuDriverCondition* cond, FFGpuDriverR
3637 FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE (libnvml , nvmlData , nvmlDeviceGetPciInfo_v3 )
3738 FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE (libnvml , nvmlData , nvmlDeviceGetTemperature )
3839 FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE (libnvml , nvmlData , nvmlDeviceGetMemoryInfo_v2 )
40+ FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE (libnvml , nvmlData , nvmlDeviceGetMemoryInfo )
3941 FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE (libnvml , nvmlData , nvmlDeviceGetNumGpuCores )
4042 FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE (libnvml , nvmlData , nvmlDeviceGetMaxClockInfo )
4143 FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE (libnvml , nvmlData , nvmlDeviceGetUtilizationRates )
@@ -130,6 +132,15 @@ const char* ffDetectNvidiaGpuInfo(const FFGpuDriverCondition* cond, FFGpuDriverR
130132 result .memory -> total = memory .used + memory .free ;
131133 result .memory -> used = memory .used ;
132134 }
135+ else
136+ {
137+ nvmlMemory_t memory_v1 ;
138+ if (nvmlData .ffnvmlDeviceGetMemoryInfo (device , & memory_v1 ) == NVML_SUCCESS )
139+ {
140+ result .memory -> total = memory_v1 .total ;
141+ result .memory -> used = memory_v1 .used ;
142+ }
143+ }
133144 }
134145
135146 if (result .coreCount )
0 commit comments