Skip to content

Preload the nvJitLink library installed by pip if available #28977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dfm
Copy link
Contributor

@dfm dfm commented May 23, 2025

As reported in #28929, since cuSPARSE and cuSOLVER depend on the nvJitLink via RUNPATH, the incorrect version of nvJitLink might be loaded when cuSPARSE or cuSOLVER is loaded if LD_LIBRARY_PATH is set.

The advice in #28929 was to make sure that LD_LIBRARY_PATH is unset, but we can avoid this problem even when LD_LIBRARY_PATH is set by preloading the nvJitLink library from the pip package when it is available. In this case, cuSPARSE and cuSOLVER will no longer try to load the wrong version, since the library is already available.

I have manually checked that this fixes #28929 even when LD_LIBRARY_PATH is set in a VM with multiple incompatible versions of nvJitLink available.

@dfm dfm self-assigned this May 23, 2025
@dfm dfm requested a review from hawkinsp May 23, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installing jax[cuda12]==0.6.1 leads to a RuntimeError because the cuSPARSE library cannot be found
1 participant