Skip to content

Commit a51840f

Browse files
authored
Robustness fix: don't break in case of directories without read permission
1 parent 18e827d commit a51840f

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
@@ -214,8 +214,11 @@ def get_cuda_runtime_lib_paths(candidate_paths: Set[Path]) -> Set[Path]:
214214
paths = set()
215215
for libname in CUDA_RUNTIME_LIBS:
216216
for path in candidate_paths:
217-
if (path / libname).is_file():
218-
paths.add(path / libname)
217+
try:
218+
if (path / libname).is_file():
219+
paths.add(path / libname)
220+
except PermissionError:
221+
pass
219222
return paths
220223

221224

0 commit comments

Comments
 (0)