summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kuhn <michael.kuhn@ovgu.de>2022-12-08 06:31:00 +0100
committerGitHub <noreply@github.com>2022-12-08 06:31:00 +0100
commit0ea81affd18820933640279bbc687038b3296a4e (patch)
tree24633b40b6c9de0dcea6c946c203b7e0f14cdb13
parentddc6e233c70273dd5dfd8dab31729eaf538693b8 (diff)
downloadspack-0ea81affd18820933640279bbc687038b3296a4e.tar.gz
spack-0ea81affd18820933640279bbc687038b3296a4e.tar.bz2
spack-0ea81affd18820933640279bbc687038b3296a4e.tar.xz
spack-0ea81affd18820933640279bbc687038b3296a4e.zip
py-torch: fix build with gcc@12: (#34352)
-rw-r--r--var/spack/repos/builtin/packages/py-torch/package.py9
1 files changed, 9 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 fa498232cb..3521475f6f 100644
--- a/var/spack/repos/builtin/packages/py-torch/package.py
+++ b/var/spack/repos/builtin/packages/py-torch/package.py
@@ -338,6 +338,15 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
when="@:1.9.1 ^cuda@11.4.100:",
)
+ # PyTorch does not build with GCC 12 (fixed on master)
+ # See: https://github.com/pytorch/pytorch/issues/77614
+ patch(
+ "https://github.com/facebookincubator/gloo/commit/4a5e339b764261d20fc409071dc7a8b8989aa195.patch?full_index=1",
+ sha256="dc8b3a9bea4693f32d6850ea2ce6ce75e1778538bfba464b50efca92bac425e3",
+ when="@:1.13 %gcc@12:",
+ working_dir="third_party/gloo",
+ )
+
@when("@1.5.0:")
def patch(self):
# https://github.com/pytorch/pytorch/issues/52208