cudnn: fix cross compilation

(cherry picked from commit 9033bb5585)
This commit is contained in:
Ross Carter
2026-10-26 15:38:30 -04:00
committed by github-actions[bot]
parent 0f494fe08c
commit 0fe503acb2

View File

@@ -5,7 +5,7 @@
lib,
libcublas,
cuda_nvrtc,
patchelf,
buildPackages,
zlib,
}:
buildRedist (
@@ -39,8 +39,8 @@ buildRedist (
# exist in CuDNN 8.
# NOTE: Versions from CUDNN releases have four components.
postFixup = lib.optionalString (cudnnAtLeast "8" && cudnnOlder "9") ''
${lib.getExe patchelf} ''${!outputLib:?}/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so
${lib.getExe patchelf} ''${!outputLib:?}/lib/libcudnn_ops_infer.so --add-needed libcublas.so --add-needed libcublasLt.so
${lib.getExe buildPackages.patchelf} ''${!outputLib:?}/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so
${lib.getExe buildPackages.patchelf} ''${!outputLib:?}/lib/libcudnn_ops_infer.so --add-needed libcublas.so --add-needed libcublasLt.so
'';
# CuDNN depends on libnvrtc.so at runtime, as mentioned here in one small error description