From b93ff6fdfff853d515f1695ef25761166ef448b8 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 17 Jan 2022 02:41:23 -0600 Subject: [PATCH] PyTorch: specify CUDA version incompatibility (#28432) --- var/spack/repos/builtin/packages/py-torch/package.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index c4940fddfb..0802b65c35 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -128,9 +128,11 @@ class PyTorch(PythonPackage, CudaPackage): depends_on('benchmark', when='@1.6:+test') # Optional dependencies - depends_on('cuda@7.5:', when='+cuda', type=('build', 'link', 'run')) - depends_on('cuda@9:', when='@1.1:+cuda', type=('build', 'link', 'run')) - depends_on('cuda@9.2:', when='@1.6:+cuda', type=('build', 'link', 'run')) + # https://discuss.pytorch.org/t/compiling-1-10-1-from-source-with-gcc-11-and-cuda-11-5/140971 + depends_on('cuda@9.2:', when='@1.11:+cuda', type=('build', 'link', 'run')) + depends_on('cuda@9.2:11.4', when='@1.6:+cuda', type=('build', 'link', 'run')) + depends_on('cuda@9:11.4', when='@1.1:+cuda', type=('build', 'link', 'run')) + depends_on('cuda@7.5:11.4', when='+cuda', type=('build', 'link', 'run')) depends_on('cudnn@6:7', when='@:1.0+cudnn') depends_on('cudnn@7.0:7', when='@1.1:1.5+cudnn') depends_on('cudnn@7:', when='@1.6:+cudnn')