Skip to content

Commit

Permalink
CUDA setup: remove duplicate sort
Browse files Browse the repository at this point in the history
The "sort compute capabilities" fix from #703 (#527) would actually do nothing due to this.
  • Loading branch information
akx committed Jan 30, 2024
1 parent dd2bac3 commit 5adf653
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bitsandbytes/cuda_setup/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,7 @@ def evaluate_cuda_setup():
return f'libbitsandbytes_cpu{DYNAMIC_LIBRARY_SUFFIX}', None, None, None

cudart_path = determine_cuda_runtime_lib_path()
ccs = get_compute_capabilities()
ccs.sort()
cc = ccs[-1] # we take the highest capability
cc = get_compute_capabilities()[-1] # we take the highest capability
cuda_version_string = get_cuda_version()

cuda_setup.add_log_entry(f"CUDA SETUP: PyTorch settings found: CUDA_VERSION={cuda_version_string}, Highest Compute Capability: {cc}.")
Expand All @@ -384,7 +382,7 @@ def evaluate_cuda_setup():

binary_name = f"libbitsandbytes_cuda{cuda_version_string}"
if not has_cublaslt:
# if not has_cublaslt (CC < 7.5), then we have to choose _nocublaslt
# if not has_cublaslt (CC < 7.5), then we have to choose _nocublaslt
binary_name += "_nocublaslt"

binary_name = f"{binary_name}{DYNAMIC_LIBRARY_SUFFIX}"
Expand Down

0 comments on commit 5adf653

Please sign in to comment.