Skip to content

Commit

Permalink
Merge pull request bitsandbytes-foundation#593 from bilelomrani1/main
Browse files Browse the repository at this point in the history
Fix bitsandbytes import error when CUDA is unavailable
  • Loading branch information
TimDettmers authored Jul 15, 2023
2 parents 486488b + 35dbb1f commit 8cdec88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitsandbytes/cuda_setup/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def evaluate_cuda_setup():
cuda_setup.add_log_entry(('Welcome to bitsandbytes. For bug reports, please run\n\npython -m bitsandbytes\n\n'),
('and submit this information together with your error trace to: https://github.com/TimDettmers/bitsandbytes/issues'))
cuda_setup.add_log_entry('='*80)
if not torch.cuda.is_available(): return 'libbitsandbytes_cpu.so', None, None, None, None
if not torch.cuda.is_available(): return 'libbitsandbytes_cpu.so', None, None, None

cudart_path = determine_cuda_runtime_lib_path()
ccs = get_compute_capabilities()
Expand Down

0 comments on commit 8cdec88

Please sign in to comment.