We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 970769e commit 9e746f7Copy full SHA for 9e746f7
1 file changed
devito/arch/archinfo.py
@@ -657,10 +657,11 @@ def check_cuda_runtime():
657
runtime_version = ctypes.c_int()
658
659
# Check the get*Version call succeeds and is a non-zero value
660
- if cuda.cudaDriverGetVersion(ctypes.byref(driver_version)) == 0 \
661
- and cuda.cudaRuntimeGetVersion(ctypes.byref(runtime_version)) == 0 \
662
- and driver_version.value:
+ call_success = cuda.cudaDriverGetVersion(ctypes.byref(driver_version)) == 0
+ call_success &= cuda.cudaRuntimeGetVersion(ctypes.byref(runtime_version)) == 0
+ call_success &= bool(driver_version.value)
663
664
+ if call_success:
665
driver_v = parse(str(driver_version.value/1000))
666
runtime_v = parse(str(runtime_version.value/1000))
667
# First check the "major" version, known to be incompatible
0 commit comments