cudnn: add rpath to helper libraries for cudnn 8#3399
Open
Markus92 wants to merge 2 commits intospack:developfrom
Open
cudnn: add rpath to helper libraries for cudnn 8#3399Markus92 wants to merge 2 commits intospack:developfrom
Markus92 wants to merge 2 commits intospack:developfrom
Conversation
haampie
reviewed
Feb 12, 2026
haampie
reviewed
Feb 12, 2026
Contributor
Author
|
Thanks for the comments, @haampie ! Took care of them hopefully |
haampie
approved these changes
Feb 12, 2026
Member
|
Would be good to test drive a bit, cause patchelf's mechanism for growing the dynamic section is a rather involved operation. Plus look if the file size is much larger than before (probably won't matter cause of how big the rest of cuda is). I don't have an nvidia gpu to test on though |
Contributor
Author
|
File sizes differ a bit but not much, 7mb on a 2.3gb package for CuDNN 8.9.7 Some simple tests seem to indicate it works (simple MNIST example). I'll deploy it across our users and report back if it fixes their issues. |
Member
|
sounds good to me |
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.
CuDNN versions prior to 7 shipped with one library:
libcudnn.so. This made linking easy as there is only one thing to link to.CuDNN 8 changed this: the CuDNN library was split into 6 libraries and a shim
libcudnn.so. To make surelibcudnn.socan find it's helper libraries, it has its rpath set to$ORIGIN. As all libs come into the same folder, this works fine for the most part. However, the individual split libraries do not have an rpath set, so they cannot see each other. When using pytorch this can lead to library not found errors during runtime, as the libraries do link to each other: e.g.libcudnn_adv_infer.solinks tolibcudnn_ops_infer.so.8CuDNN 9 has the rpath set to
$ORIGINin all helper libraries off-the-shelf, so is not affected by this behavior. This PR adds that behavior to CuDNN 8.