|
5 | 5 |
|
6 | 6 | import torch |
7 | 7 |
|
8 | | -from bitsandbytes.cextension import BNB_BACKEND, HIP_ENVIRONMENT, get_cuda_bnb_library_path |
| 8 | +from bitsandbytes.cextension import HIP_ENVIRONMENT, get_cuda_bnb_library_path |
9 | 9 | from bitsandbytes.consts import NONPYTORCH_DOC_URL |
10 | 10 | from bitsandbytes.cuda_specs import CUDASpecs |
11 | 11 | from bitsandbytes.diagnostics.utils import print_dedented |
|
34 | 34 |
|
35 | 35 | logger = logging.getLogger(__name__) |
36 | 36 |
|
| 37 | + |
37 | 38 | def get_runtime_lib_patterns() -> tuple: |
38 | 39 | if HIP_ENVIRONMENT: |
39 | 40 | return ("libamdhip64.so*",) |
40 | 41 | else: |
41 | 42 | return ( |
42 | | - "cudart64*.dll", # Windows |
43 | | - "libcudart*.so*", # libcudart.so, libcudart.so.11.0, libcudart.so.12.0, libcudart.so.12.1, libcudart.so.12.2 etc. |
44 | | - "nvcuda*.dll", # Windows |
45 | | - ) |
| 43 | + "cudart64*.dll", # Windows |
| 44 | + "libcudart*.so*", # libcudart.so, libcudart.so.11.0, libcudart.so.12.0, libcudart.so.12.1, libcudart.so.12.2 etc. |
| 45 | + "nvcuda*.dll", # Windows |
| 46 | + ) |
46 | 47 |
|
47 | 48 |
|
48 | 49 | def find_cuda_libraries_in_path_list(paths_list_candidate: str) -> Iterable[Path]: |
@@ -213,7 +214,7 @@ def _print_cuda_runtime_diagnostics() -> None: |
213 | 214 | def _print_hip_runtime_diagnostics() -> None: |
214 | 215 | cudart_paths = list(find_cudart_libraries()) |
215 | 216 | if not cudart_paths: |
216 | | - print(f"WARNING! ROCm runtime files not found in any environmental path.") |
| 217 | + print("WARNING! ROCm runtime files not found in any environmental path.") |
217 | 218 | elif len(cudart_paths) > 1: |
218 | 219 | print_dedented( |
219 | 220 | f""" |
|
0 commit comments