Skip to content

Commit

Permalink
Added additional error message for cudart error #85
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDettmers committed Jan 3, 2023
1 parent dfb049f commit 9180b4c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bitsandbytes/cuda_setup/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,12 @@ def get_cuda_version(cuda, cudart_path):
return None

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

0 comments on commit 9180b4c

Please sign in to comment.