From 638f44d842d14d776fc78633f5c32e4dab808264 Mon Sep 17 00:00:00 2001 From: Robert Blake Date: Wed, 2 Sep 2020 17:52:00 -0700 Subject: [PATCH] CUDA_HOME needs to be set, or CUDA is found based on user's PATH. (#18475) --- var/spack/repos/builtin/packages/py-torchvision/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index ae6402d1c1..b70e2cd367 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -86,5 +86,6 @@ def setup_build_environment(self, env): if '+cuda' in self.spec['py-torch']: env.set('FORCE_CUDA', 1) + env.set('CUDA_HOME', self.spec['cuda'].prefix) else: env.set('FORCE_CUDA', 0)