From 57fa64628f78b2f19fa31e94a9a8c59e3727888b Mon Sep 17 00:00:00 2001 From: Titus von Koeller Date: Mon, 1 Aug 2022 03:22:12 -0700 Subject: minor refactor to more concise syntax --- bitsandbytes/cuda_setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bitsandbytes') 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 -- cgit v1.2.3