* guix/import/cuda.scm (%cuda-updater): Add variable. * nongnu/packages/nvidia.scm (cuda-cccl, cuda-cudart, cuda-cuobjdump, cuda-cuxxfilt, cuda-cupti, cuda-gdb, libnvvm, cuda-nvcc, cuda-nvml-dev, cuda-nvdisasm, cuda-nvprof, cuda-nvprune, cuda-nvrtc, cuda-nvtx, cuda-opencl, cuda-profiler-api, cuda-sanitizer-api, libcublas, libcufft, libcurand, libcusolver, libcusparse, libnvfatbin, libnvjitlink, libnvjpeg, libnpp, cuda-toolkit, cuda-dev, nvidia-cudnn, nvidia-cudnn-frontend, nvidia-nccl): Add variables. * nonguix/build-system/cuda.scm (cuda-license, cuda-current-system, cuda-module-url, guix-system->cuda-system, %cuda-build-system-modules, cuda-build, cuda-build-system): Add variable. * nonguix/build/binary-build-system.scm (autopatchelf): Add variable. * nonguix/build/cuda-build-system.scm (cuda-build): Add variable. * nonguix/build/utils.scm (install-static-output): Add variable. * nongnu/packages/patches: Add necessary patches.
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From 0c16ed53cae242b02069a1f6fed463dc819526e0 Mon Sep 17 00:00:00 2001
|
|
From: Nicolas Graves <ngraves@ngraves.fr>
|
|
Date: Thu, 25 Jul 2024 14:58:42 +0200
|
|
Subject: [PATCH] Use absolute store cudnn.so path.
|
|
|
|
---
|
|
python/cudnn/__init__.py | 16 +---------------
|
|
1 file changed, 1 insertion(+), 15 deletions(-)
|
|
|
|
diff --git a/python/cudnn/__init__.py b/python/cudnn/__init__.py
|
|
index 35eb883..39dc047 100644
|
|
--- a/python/cudnn/__init__.py
|
|
+++ b/python/cudnn/__init__.py
|
|
@@ -137,21 +137,7 @@ pygraph.execute_plan_at_index = _execute_plan_at_index
|
|
|
|
|
|
def _dlopen_cudnn():
|
|
- # First look at python site packages
|
|
- lib_path = glob.glob(
|
|
- os.path.join(
|
|
- sysconfig.get_path("purelib"), "nvidia/cudnn/lib/libcudnn.so.*[0-9]"
|
|
- )
|
|
- )
|
|
-
|
|
- if lib_path:
|
|
- assert (
|
|
- len(lib_path) == 1
|
|
- ), f"Found {len(lib_path)} libcudnn.so.x in nvidia-cudnn-cuXX."
|
|
- lib = ctypes.CDLL(lib_path[0])
|
|
- else: # Fallback
|
|
- lib = ctypes.CDLL("libcudnn.so")
|
|
-
|
|
+ lib = ctypes.CDLL(@store-cudnn.so-path@)
|
|
handle = ctypes.cast(lib._handle, ctypes.c_void_p).value
|
|
_compiled_module._set_dlhandle_cudnn(handle)
|
|
|
|
--
|
|
2.45.2
|
|
|