fix(pathfinder): Linux .so glob fallback prefers newest (#1732)#1966
Merged
rwgk merged 2 commits intoNVIDIA:mainfrom Apr 23, 2026
Merged
fix(pathfinder): Linux .so glob fallback prefers newest (#1732)#1966rwgk merged 2 commits intoNVIDIA:mainfrom
rwgk merged 2 commits intoNVIDIA:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1732.
Summary
cuda_pathfinder/cuda/pathfinder/_dynamic_libs/search_platform.py:_find_so_in_rel_dirs(the site-packages wheel lookup) now usessorted(..., reverse=True)on its versioned-.soglob, matching thenewest-first policy already used by
LinuxSearchPlatform.find_in_lib_dir(the conda /
CUDA_PATHlookup) and by the descriptor-drivenalready-loaded / system-search order in
load_dl_linux/load_dl_windows._find_so_in_rel_dirsdocumenting why thefallback exists, that a single match is expected in practice, the
newest-first tie-breaker, and a pointer back to this issue.
LinuxSearchPlatform.find_in_lib_dir.cuda_pathfinder/tests/test_search_steps.py: added six tests (three percall site) locking in the newest-first policy: zero / one / multiple
versioned matches at both the site-packages and conda/
CUDA_PATHcallsites, using
libcudart.so.12/libcudart.so.13as the fixtures.Behavioral changes to ambiguity handling (raising when multiple versioned
files coexist) remain deferred to #1038, consistent with the triage
decision recorded on #1732.
Original review thread:
#1693 (comment)
Test plan
pixi run pytest tests/fromcuda_pathfinder/— 966 passed, 4skipped (unchanged count except +6 new tests).
set).
pre-change sort by reverting the keyword locally.