Fix cufftMp soname priority: tabulate linux_sonames oldest-first - #2499
Open
LeSingh1 wants to merge 1 commit into
Open
Fix cufftMp soname priority: tabulate linux_sonames oldest-first#2499LeSingh1 wants to merge 1 commit into
LeSingh1 wants to merge 1 commit into
Conversation
`load_dl_linux._candidate_sonames()` reverses `desc.linux_sonames` "to achieve
new -> old search order", so the catalog must list the oldest version first.
`cufftMp` is the only entry that lists them newest-first
(`libcufftMp.so.12`, `libcufftMp.so.11`), which inverts the intent: when both
versions are reachable, the already-loaded check and the system search both
pick `libcufftMp.so.11` over `libcufftMp.so.12`.
The entry started as `("libcufftMp.so.11",)` and `.so.12` was prepended rather
than appended in NVIDIA#1194. Swap the two and add a catalog invariant test so the
next entry cannot regress the same way.
Contributor
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.
load_dl_linux._candidate_sonames()reversesdesc.linux_sonames"to achieve new -> old search order", so the catalog has to tabulate oldest version first.cufftMpis the only one of the 49 catalog entries that lists them newest-first:After the reversal that becomes
.so.11then.so.12, so on a system where both are reachable,load_nvidia_dynamic_lib("cufftMp")picks the older one — both incheck_if_already_loaded_from_elsewhere()and in the system search. Every other library prefers the newest.The entry started as
("libcufftMp.so.11",)and.so.12was prepended rather than appended in #1194.This swaps the two, documents the convention on the
DescriptorSpec.linux_sonamesfield, and adds a parametrized catalog invariant so a future entry can't regress the same way silently. The invariant fails oncufftMpalone before the swap.Not addressed here:
cupti.windows_dllsis also tabulated newest-first. It looked like the same mistake, but correcting the data would also changecheck_if_already_loaded_from_elsewhere(), which — unlike its Linux counterpart and unlikeload_with_system_search— does not reverse the tuple. I have no way to test that path, so I left it for someone who can.NOTE: developed with the assistance of an AI coding agent. The new test carries
@pytest.mark.agent_authoredper AGENTS.md. I reviewed and verified the change before submitting.