This commit is contained in:
henryruhs
2026-05-11 16:36:23 +02:00
parent 6c1475f720
commit 0816bea6d3
2 changed files with 9 additions and 9 deletions
+8 -8
View File
@@ -54,28 +54,28 @@ def init_ctypes(nvidia_ml : ctypes.CDLL) -> ctypes.CDLL:
nvidia_ml.nvmlShutdown.argtypes = [] nvidia_ml.nvmlShutdown.argtypes = []
nvidia_ml.nvmlShutdown.restype = ctypes.c_int nvidia_ml.nvmlShutdown.restype = ctypes.c_int
nvidia_ml.nvmlDeviceGetCount_v2.argtypes = [ctypes.POINTER(ctypes.c_uint)] nvidia_ml.nvmlDeviceGetCount_v2.argtypes = [ ctypes.POINTER(ctypes.c_uint) ]
nvidia_ml.nvmlDeviceGetCount_v2.restype = ctypes.c_int nvidia_ml.nvmlDeviceGetCount_v2.restype = ctypes.c_int
nvidia_ml.nvmlSystemGetDriverVersion.argtypes = [ctypes.c_char_p, ctypes.c_uint] nvidia_ml.nvmlSystemGetDriverVersion.argtypes = [ ctypes.c_char_p, ctypes.c_uint ]
nvidia_ml.nvmlSystemGetDriverVersion.restype = ctypes.c_int nvidia_ml.nvmlSystemGetDriverVersion.restype = ctypes.c_int
nvidia_ml.nvmlSystemGetCudaDriverVersion.argtypes = [ctypes.POINTER(ctypes.c_int)] nvidia_ml.nvmlSystemGetCudaDriverVersion.argtypes = [ ctypes.POINTER(ctypes.c_int) ]
nvidia_ml.nvmlSystemGetCudaDriverVersion.restype = ctypes.c_int nvidia_ml.nvmlSystemGetCudaDriverVersion.restype = ctypes.c_int
nvidia_ml.nvmlDeviceGetHandleByIndex_v2.argtypes = [ctypes.c_uint, ctypes.POINTER(ctypes.c_void_p)] nvidia_ml.nvmlDeviceGetHandleByIndex_v2.argtypes = [ ctypes.c_uint, ctypes.POINTER(ctypes.c_void_p) ]
nvidia_ml.nvmlDeviceGetHandleByIndex_v2.restype = ctypes.c_int nvidia_ml.nvmlDeviceGetHandleByIndex_v2.restype = ctypes.c_int
nvidia_ml.nvmlDeviceGetName.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_uint] nvidia_ml.nvmlDeviceGetName.argtypes = [ ctypes.c_void_p, ctypes.c_char_p, ctypes.c_uint ]
nvidia_ml.nvmlDeviceGetName.restype = ctypes.c_int nvidia_ml.nvmlDeviceGetName.restype = ctypes.c_int
nvidia_ml.nvmlDeviceGetMemoryInfo.argtypes = [ctypes.c_void_p, ctypes.c_void_p] nvidia_ml.nvmlDeviceGetMemoryInfo.argtypes = [ ctypes.c_void_p, ctypes.c_void_p ]
nvidia_ml.nvmlDeviceGetMemoryInfo.restype = ctypes.c_int nvidia_ml.nvmlDeviceGetMemoryInfo.restype = ctypes.c_int
nvidia_ml.nvmlDeviceGetTemperature.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.POINTER(ctypes.c_uint)] nvidia_ml.nvmlDeviceGetTemperature.argtypes = [ ctypes.c_void_p, ctypes.c_int, ctypes.POINTER(ctypes.c_uint) ]
nvidia_ml.nvmlDeviceGetTemperature.restype = ctypes.c_int nvidia_ml.nvmlDeviceGetTemperature.restype = ctypes.c_int
nvidia_ml.nvmlDeviceGetUtilizationRates.argtypes = [ctypes.c_void_p, ctypes.c_void_p] nvidia_ml.nvmlDeviceGetUtilizationRates.argtypes = [ ctypes.c_void_p, ctypes.c_void_p ]
nvidia_ml.nvmlDeviceGetUtilizationRates.restype = ctypes.c_int nvidia_ml.nvmlDeviceGetUtilizationRates.restype = ctypes.c_int
return nvidia_ml return nvidia_ml
+1 -1
View File
@@ -70,7 +70,7 @@ def detect_nvidia_graphic_devices() -> List[GraphicDevice]:
'framework': 'framework':
{ {
'name': 'CUDA', 'name': 'CUDA',
'version': cuda_version.value 'version': str(cuda_version.value)
}, },
'product': 'product':
{ {