minor refactor to more concise syntax

This commit is contained in:
Titus von Koeller 2022-08-01 03:22:12 -07:00
parent 4a6ea7e24b
commit 57fa64628f

View File

@ -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