diff options
author | Melven Roehrig-Zoellner <Melven.Roehrig-Zoellner@DLR.de> | 2022-08-07 17:27:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-07 08:27:51 -0700 |
commit | 67154a1088a5ff962fe094e7e180cd8c24e920d4 (patch) | |
tree | 2f6f97c2b9754b6bfd22e96ef65553881699e6fd | |
parent | 86be4666fcd5c036e90a335be68b0641a4b5cf3a (diff) | |
download | spack-67154a1088a5ff962fe094e7e180cd8c24e920d4.tar.gz spack-67154a1088a5ff962fe094e7e180cd8c24e920d4.tar.bz2 spack-67154a1088a5ff962fe094e7e180cd8c24e920d4.tar.xz spack-67154a1088a5ff962fe094e7e180cd8c24e920d4.zip |
cudnn: adjust version dependency on CUDA (#31763)
-rw-r--r-- | var/spack/repos/builtin/packages/cudnn/package.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/cudnn/package.py b/var/spack/repos/builtin/packages/cudnn/package.py index 6c9f1fe933..3fe161fbc6 100644 --- a/var/spack/repos/builtin/packages/cudnn/package.py +++ b/var/spack/repos/builtin/packages/cudnn/package.py @@ -250,9 +250,11 @@ class Cudnn(Package): if pkg: version(long_ver, sha256=pkg) # Add constraints matching CUDA version to cuDNN version - cuda_req = "cuda@{0}.0:{0}".format(cuda_ver) - cudnn_ver_req = "@{0}".format(long_ver) - depends_on(cuda_req, when=cudnn_ver_req) + # cuDNN builds for CUDA 11.x are compatible with all CUDA 11.x: + # https://docs.nvidia.com/deeplearning/cudnn/support-matrix/index.html#fntarg_2 + if Version(cuda_ver) >= Version("11"): + cuda_ver = Version(cuda_ver).up_to(1) + depends_on("cuda@{}".format(cuda_ver), when="@{}".format(long_ver)) def url_for_version(self, version): # Get the system and machine arch for building the file path |