Skip to content
Snippets Groups Projects
Commit 1989507b authored by Markus Holzer's avatar Markus Holzer
Browse files

Implement fallback case

parent f2314863
No related branches found
No related tags found
1 merge request!145Replace PyCuda with CuPy
...@@ -41,6 +41,15 @@ except ImportError: ...@@ -41,6 +41,15 @@ except ImportError:
cupy = None cupy = None
device = None device = None
if cupy:
try:
device = cupy.cuda.Device(pystencils.GPU_DEVICE)
except AttributeError:
warnings.warn("You are using an old pystencils version. Consider updating it")
device = cupy.cuda.Device(0)
else:
device = None
try: try:
from psutil import virtual_memory from psutil import virtual_memory
except ImportError: except ImportError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment