3 preferences
= bpy
.context
.preferences
.addons
["cycles"].preferences
4 devices
= preferences
.get_devices_for_type("CUDA")
5 ids
= [d
.id for d
in devices
]
7 assert any("CUDA" in i
for i
in ids
), f
"CUDA not present in {ids}"
8 print("CUDA is available")