From 35dbb1ff525cb4fb9c1c10f0aaf308339d8c4e90 Mon Sep 17 00:00:00 2001 From: Bilel Omrani Date: Sat, 15 Jul 2023 02:04:26 +0200 Subject: [PATCH] Fix bitsandbytes import error when CUDA is unavailable --- bitsandbytes/cuda_setup/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitsandbytes/cuda_setup/main.py b/bitsandbytes/cuda_setup/main.py index 190ef58..1d0cfae 100644 --- a/bitsandbytes/cuda_setup/main.py +++ b/bitsandbytes/cuda_setup/main.py @@ -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()