summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Dettmers <tim.dettmers@gmail.com>2022-10-27 08:54:30 -0700
committerTim Dettmers <tim.dettmers@gmail.com>2022-10-27 08:54:30 -0700
commit4844aef4ff51b433d549a9acc49b11a925b6f4fe (patch)
tree59c02ce469903fccd11472c82598669df0dd70ae
parent96ab2af1efb4d2f84e5292fd6bcdb37d6ee654e7 (diff)
Fixing bad error when GPU was not detected for #73.
-rw-r--r--CHANGELOG.md5
-rw-r--r--bitsandbytes/cuda_setup/main.py8
-rw-r--r--setup.py2
3 files changed, 9 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5fa7231..ce96760 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -144,3 +144,8 @@ Bug fixes:
Bug fixes:
- Fixed a bug where the CUDA setup failed due to a wrong function call.
+
+### 0.35.3
+
+Bug fixes:
+ - Fixed a bug in the CUDA Setup which led to an incomprehensible error if no GPU was detected.
diff --git a/bitsandbytes/cuda_setup/main.py b/bitsandbytes/cuda_setup/main.py
index 8fdaec0..0fc813b 100644
--- a/bitsandbytes/cuda_setup/main.py
+++ b/bitsandbytes/cuda_setup/main.py
@@ -86,9 +86,7 @@ def get_compute_capabilities(cuda):
ref_major = ctypes.byref(cc_major)
ref_minor = ctypes.byref(cc_minor)
# 2. call extern C function to determine CC
- check_cuda_result(
- cuda, cuda.cuDeviceComputeCapability(ref_major, ref_minor, device)
- )
+ check_cuda_result(cuda, cuda.cuDeviceComputeCapability(ref_major, ref_minor, device))
ccs.append(f"{cc_major.value}.{cc_minor.value}")
return ccs
@@ -134,9 +132,9 @@ def evaluate_cuda_setup():
cuda_version_string = get_cuda_version(cuda, cudart_path)
- if cc == '':
+ if cc == '' or cc is None:
cuda_setup.add_log_entry("WARNING: No GPU detected! Check your CUDA paths. Processing to load CPU-only library...", is_warning=True)
- return binary_name
+ return binary_name, cudart_path, cuda, cc, cuda_version_string
# 7.5 is the minimum CC vor cublaslt
has_cublaslt = cc in ["7.5", "8.0", "8.6"]
diff --git a/setup.py b/setup.py
index bbb53a1..13328dd 100644
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@ def read(fname):
setup(
name=f"bitsandbytes",
- version=f"0.35.2",
+ version=f"0.35.3",
author="Tim Dettmers",
author_email="dettmers@cs.washington.edu",
description="8-bit optimizers and matrix multiplication routines.",