Skip to content

Commit 512ff6f

Browse files
committed
arch: prevent erroring at init in isolation
1 parent 3e6c852 commit 512ff6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

devito/arch/archinfo.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,11 @@ def check_cuda_runtime():
661661
driver_version = driver_version.value
662662
runtime_version = runtime_version.value
663663

664+
if driver_version == 0:
665+
# cudart present but no driver detected. Likely isolation
666+
# run such as version check or within a docker build.
667+
return
668+
664669
driver_v = parse(str(driver_version/1000))
665670
runtime_v = parse(str(runtime_version/1000))
666671
# First check the "major" version, known to be incompatible

0 commit comments

Comments
 (0)