MCPcopy Create free account
hub / github.com/Comfy-Org/ComfyUI / enum_display_devices

Function enum_display_devices

cuda_malloc.py:27–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26 # Call EnumDisplayDevicesA
27 def enum_display_devices():
28 device_info = DISPLAY_DEVICEA()
29 device_info.cb = ctypes.sizeof(device_info)
30 device_index = 0
31 gpu_names = set()
32
33 while user32.EnumDisplayDevicesA(None, device_index, ctypes.byref(device_info), 0):
34 device_index += 1
35 gpu_names.add(device_info.DeviceString.decode('utf-8'))
36 return gpu_names
37 return enum_display_devices()
38 else:
39 gpu_names = set()

Callers 1

get_gpu_namesFunction · 0.85

Calls 3

DISPLAY_DEVICEAClass · 0.85
addMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected