summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2019-10-28 11:47:21 -0500
committerGitHub <noreply@github.com>2019-10-28 11:47:21 -0500
commit33a34f9619a1eff866a1ae3b673f92d4ce5936a5 (patch)
treebbbd530962975b741e6c07fe2810c007af14d8a9
parentb4e027e91888f09badfa20de0d346b983406872f (diff)
downloadspack-33a34f9619a1eff866a1ae3b673f92d4ce5936a5.tar.gz
spack-33a34f9619a1eff866a1ae3b673f92d4ce5936a5.tar.bz2
spack-33a34f9619a1eff866a1ae3b673f92d4ce5936a5.tar.xz
spack-33a34f9619a1eff866a1ae3b673f92d4ce5936a5.zip
Fix PyTorch build with Intel MKL (#13464)
-rw-r--r--var/spack/repos/builtin/packages/py-torch/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py
index 451c71d743..8fec773e3d 100644
--- a/var/spack/repos/builtin/packages/py-torch/package.py
+++ b/var/spack/repos/builtin/packages/py-torch/package.py
@@ -169,6 +169,11 @@ class PyTorch(PythonPackage):
else:
env.set('NO_' + var, 'ON')
+ # Build system has problems locating MKL libraries
+ # See https://github.com/pytorch/pytorch/issues/24334
+ if 'mkl' in self.spec:
+ env.prepend_path('CMAKE_PREFIX_PATH', self.spec['mkl'].prefix.mkl)
+
env.set('MAX_JOBS', make_jobs)
enable_or_disable('cuda')