Skip to content

Commit c92d268

Browse files
authored
Fix: Remove duplicate try_site_packages() call in load_nvidia_dynamic_lib (#1258)
Remove redundant call to finder.try_site_packages() on line 28 that was immediately overwritten by the same call on line 30. This duplicate call was wasteful (unnecessary filesystem traversal) and indicates a code review oversight. The function now correctly calls try_site_packages() only once, improving performance with no functional changes. Location: cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py:28
1 parent 2607e0e commit c92d268

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
def _load_lib_no_cache(libname: str) -> LoadedDL:
2727
finder = _FindNvidiaDynamicLib(libname)
28-
abs_path = finder.try_site_packages()
29-
3028
abs_path = finder.try_site_packages()
3129
if abs_path is not None:
3230
found_via = "site-packages"

0 commit comments

Comments
 (0)