Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
8 lines
255 B
Python
8 lines
255 B
Python
import bpy
|
|
|
|
preferences = bpy.context.preferences.addons["cycles"].preferences
|
|
devices = preferences.get_devices_for_type("CUDA")
|
|
ids = [d.id for d in devices]
|
|
|
|
assert any("CUDA" in i for i in ids), f"CUDA not present in {ids}"
|
|
print("CUDA is available")
|