diff --git a/benchmark/configure.py b/benchmark/configure.py index 844f158..1965c53 100644 --- a/benchmark/configure.py +++ b/benchmark/configure.py @@ -22,6 +22,7 @@ def setUseRequestedDevice(context, # preferably non-display one. if requested_device == "": device_found = False + display_device = None # Try to enable first non-display card. for device in cpref.devices: if device.type != device_type: @@ -29,6 +30,7 @@ def setUseRequestedDevice(context, continue if isDisplayDevice(device): device.use = False + display_device = device elif not device_found or not device_single: # Enable first non-display GPU. device_found = True @@ -38,7 +40,7 @@ def setUseRequestedDevice(context, device.use = False if not device_found: # Only display devices, enable first of them. - cpref.devices[0].use = True + display_device.use = True device_found = True else: device_found = False