Skip to content

Commit 9180b4c

Browse files
committed
Added additional error message for cudart error #85
1 parent dfb049f commit 9180b4c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bitsandbytes/cuda_setup/main.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,12 @@ def get_cuda_version(cuda, cudart_path):
281281
return None
282282

283283
version = ct.c_int()
284-
check_cuda_result(cuda, cudart.cudaRuntimeGetVersion(ct.byref(version)))
284+
try:
285+
check_cuda_result(cuda, cudart.cudaRuntimeGetVersion(ct.byref(version)))
286+
except AttributeError as e:
287+
CUDASetup.get_instance().add_log_entry(f'ERROR: {str(e)}')
288+
CUDASetup.get_instance().add_log_entry(f'CUDA SETUP: libcudart.so path is {cudart_path}')
289+
CUDASetup.get_instance().add_log_entry(f'CUDA SETUP: Is seems that your cuda installation is not in your path. See https://github.com/TimDettmers/bitsandbytes/issues/85 for more information.')
285290
version = int(version.value)
286291
major = version//1000
287292
minor = (version-(major*1000))//10

0 commit comments

Comments
 (0)