Johnny Osbournce Claude Opus 4.7 commited on
Commit
ff7e33b
·
1 Parent(s): 04a4555

fix: only enable devices matching compute backend (CUDA only)

Browse files

Avoids potential CUDA/OptiX conflict when both device types are
enabled simultaneously. This could be causing the kernel compilation
hang on A100.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Files changed (1) hide show
  1. scene.py +2 -2
scene.py CHANGED
@@ -623,9 +623,9 @@ def configure_render(engine='CYCLES'):
623
  except Exception:
624
  continue
625
 
626
- # Enable all GPU devices
627
  for device in prefs.devices:
628
- device.use = device.type in ('OPTIX', 'CUDA')
629
  print(f" Device: {device.name} ({device.type}) — {'enabled' if device.use else 'skipped'}")
630
 
631
  scene.cycles.device = 'GPU'
 
623
  except Exception:
624
  continue
625
 
626
+ # Only enable devices matching the compute backend (avoid CUDA/OptiX conflicts)
627
  for device in prefs.devices:
628
+ device.use = (device.type == prefs.compute_device_type)
629
  print(f" Device: {device.name} ({device.type}) — {'enabled' if device.use else 'skipped'}")
630
 
631
  scene.cycles.device = 'GPU'