Skip to content

Commit 9c63202

Browse files
authored
Merge pull request #677 from osma/fix-robust-check-cuda-library
Robustness fix: don't break in case of directories without read permission
2 parents 2fd74f3 + a51840f commit 9c63202

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bitsandbytes/cuda_setup/main.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,11 @@ def get_cuda_runtime_lib_paths(candidate_paths: Set[Path]) -> Set[Path]:
215215
paths = set()
216216
for libname in CUDA_RUNTIME_LIBS:
217217
for path in candidate_paths:
218-
if (path / libname).is_file():
219-
paths.add(path / libname)
218+
try:
219+
if (path / libname).is_file():
220+
paths.add(path / libname)
221+
except PermissionError:
222+
pass
220223
return paths
221224

222225

0 commit comments

Comments
 (0)