summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew W Elble <aweits@rit.edu>2021-02-22 14:02:10 -0500
committerGitHub <noreply@github.com>2021-02-22 19:02:10 +0000
commit08054ffce73dc9aeb1dabe7a3abfdb446653cc4f (patch)
treec741e36f96e74cb22cefd05ac3864e892108ac20
parent04a8e5987293ee714c215067a0f9c40cb81c12b2 (diff)
downloadspack-08054ffce73dc9aeb1dabe7a3abfdb446653cc4f.tar.gz
spack-08054ffce73dc9aeb1dabe7a3abfdb446653cc4f.tar.bz2
spack-08054ffce73dc9aeb1dabe7a3abfdb446653cc4f.tar.xz
spack-08054ffce73dc9aeb1dabe7a3abfdb446653cc4f.zip
py-torch: ensure libtorch_global_deps is linked with the c++ library (#21860)
* py-torch: ensure libtorch_global_deps is linked with the c++ library * add comment with upstream issue
-rw-r--r--var/spack/repos/builtin/packages/py-torch/package.py7
1 files changed, 7 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 4b6cd75acd..afc89b6f8c 100644
--- a/var/spack/repos/builtin/packages/py-torch/package.py
+++ b/var/spack/repos/builtin/packages/py-torch/package.py
@@ -186,6 +186,13 @@ class PyTorch(PythonPackage, CudaPackage):
headers.directories = [root]
return headers
+ @when('@1.5.0:')
+ def patch(self):
+ # https://github.com/pytorch/pytorch/issues/52208
+ filter_file('torch_global_deps PROPERTIES LINKER_LANGUAGE C',
+ 'torch_global_deps PROPERTIES LINKER_LANGUAGE CXX',
+ 'caffe2/CMakeLists.txt')
+
def setup_build_environment(self, env):
def enable_or_disable(variant, keyword='USE', var=None, newer=False):
"""Set environment variable to enable or disable support for a