diff options
author | Tim Dettmers <TimDettmers@users.noreply.github.com> | 2022-09-05 16:29:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 16:29:36 -0700 |
commit | f0ae860c86039d1c1e41166aaf2153a5bd9b9a89 (patch) | |
tree | 75477acfbce2da2a753ee21d4cf0da64f3f50ea5 /bitsandbytes/cuda_setup/paths.py | |
parent | eab4d8232d558f2e6bd7f7cc3d00e2e6e94f4e80 (diff) | |
parent | aca55881b9815a462142f42f3ff0dc917830d85c (diff) |
Merge pull request #25 from TimDettmers/remove_unused_code
Remove unused code, switch to warnings
Diffstat (limited to 'bitsandbytes/cuda_setup/paths.py')
-rw-r--r-- | bitsandbytes/cuda_setup/paths.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/bitsandbytes/cuda_setup/paths.py b/bitsandbytes/cuda_setup/paths.py index 9c565c7..6f6425f 100644 --- a/bitsandbytes/cuda_setup/paths.py +++ b/bitsandbytes/cuda_setup/paths.py @@ -2,23 +2,11 @@ from pathlib import Path from typing import Set, Union from warnings import warn -from ..utils import print_stderr from .env_vars import get_potentially_lib_path_containing_env_vars - CUDA_RUNTIME_LIB: str = "libcudart.so" -def purge_unwanted_semicolon(tentative_path: Path) -> Path: - """ - Special function to handle the following exception: - __LMOD_REF_COUNT_PATH=/sw/cuda/11.6.2/bin:2;/mmfs1/home/dettmers/git/sched/bin:1;/mmfs1/home/dettmers/data/anaconda3/bin:1;/mmfs1/home/dettmers/data/anaconda3/condabin:1;/mmfs1/home/dettmers/.local/bin:1;/mmfs1/home/dettmers/bin:1;/usr/local/bin:1;/usr/bin:1;/usr/local/sbin:1;/usr/sbin:1;/mmfs1/home/dettmers/.fzf/bin:1;/mmfs1/home/dettmers/data/local/cuda-11.4/bin:1 - """ - # if ';' in str(tentative_path): - # path_as_str, _ = str(tentative_path).split(';') - pass - - def extract_candidate_paths(paths_list_candidate: str) -> Set[Path]: return {Path(ld_path) for ld_path in paths_list_candidate.split(":") if ld_path} @@ -29,7 +17,7 @@ def remove_non_existent_dirs(candidate_paths: Set[Path]) -> Set[Path]: } if non_existent_directories: - print_stderr( + warn( "WARNING: The following directories listed in your path were found to " f"be non-existent: {non_existent_directories}" ) @@ -117,8 +105,6 @@ def determine_cuda_runtime_lib_path() -> Union[Path, None]: if env_var not in {"CONDA_PREFIX", "LD_LIBRARY_PATH"} } - - cuda_runtime_libs = set() for env_var, value in remaining_candidate_env_vars.items(): cuda_runtime_libs.update(find_cuda_lib_in(value)) |