summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTitus von Koeller <titus@vonkoeller.com>2022-08-01 03:22:12 -0700
committerTitus von Koeller <titus@vonkoeller.com>2022-08-01 03:22:12 -0700
commit57fa64628f78b2f19fa31e94a9a8c59e3727888b (patch)
tree32d8bc68901e5acf7bfee43a34d706922eaaf5c2
parent4a6ea7e24b933bf574f7707e1b331ea62f7e7273 (diff)
minor refactor to more concise syntax
-rw-r--r--bitsandbytes/cuda_setup.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bitsandbytes/cuda_setup.py b/bitsandbytes/cuda_setup.py
index 08f3ed2..2fb5049 100644
--- a/bitsandbytes/cuda_setup.py
+++ b/bitsandbytes/cuda_setup.py
@@ -131,8 +131,7 @@ def evaluate_cuda_setup():
cc = get_compute_capability()
binary_name = 'libbitsandbytes_cpu.so'
- has_gpu = cc != ''
- if not has_gpu:
+ if not (has_gpu := bool(cc)):
print('WARNING: No GPU detected! Check our CUDA paths. Processing to load CPU-only library...')
return binary_name