summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Sly <nicholas.sly@gmail.com>2022-07-21 17:02:34 -0700
committerGitHub <noreply@github.com>2022-07-21 18:02:34 -0600
commit0e6b57e953381ee755f3d491e4de72536c6a56e9 (patch)
tree854736a709fe13361f489f5f7fc41f79e54b5592
parentee39fab2266df2eb23f5e239deb015c7554be940 (diff)
downloadspack-0e6b57e953381ee755f3d491e4de72536c6a56e9.tar.gz
spack-0e6b57e953381ee755f3d491e4de72536c6a56e9.tar.bz2
spack-0e6b57e953381ee755f3d491e4de72536c6a56e9.tar.xz
spack-0e6b57e953381ee755f3d491e4de72536c6a56e9.zip
py-torch: use immutable URLs for open-ce patches (#31672)
* Update open-ce patches for py-torch to us immutable URLs. Update magma dependency specs to be more explicit. * Address comments for PR regarding URLs and conflicting variants. Co-authored-by: Nicholas Cameron Sly <sly1@llnl.gov>
-rw-r--r--var/spack/repos/builtin/packages/py-torch/package.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py
index 06f679b0fe..c5b3356045 100644
--- a/var/spack/repos/builtin/packages/py-torch/package.py
+++ b/var/spack/repos/builtin/packages/py-torch/package.py
@@ -156,7 +156,8 @@ class PyTorch(PythonPackage, CudaPackage):
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')
- depends_on('magma', when='+magma')
+ depends_on('magma+cuda', when='+magma+cuda')
+ depends_on('magma+rocm', when='+magma+rocm')
depends_on('nccl', when='+nccl')
depends_on('numactl', when='+numa')
depends_on('llvm-openmp', when='%apple-clang +openmp')
@@ -253,17 +254,20 @@ class PyTorch(PythonPackage, CudaPackage):
# Use patches from IBM's Open CE to enable building on Power systems
# 03xx - patch temporary to fix a problem that when fixed upstream can be removed
- patch('https://github.com/open-ce/pytorch-feedstock/raw/main/recipe/0302-cpp-extension.patch',
- sha256='ecb3973fa7d0f4c8f8ae40433f3ca5622d730a7b16f6cb63325d1e95baff8aa2', when='@1.10.0: arch=ppc64le:')
+ patch('https://github.com/open-ce/pytorch-feedstock/raw/0a145060ca8523314ec3893af935c3b140e2d0b0/pytorch-1.10/recipe/0302-cpp-extension.patch',
+ sha256='ecb3973fa7d0f4c8f8ae40433f3ca5622d730a7b16f6cb63325d1e95baff8aa2', when='@1.10:1.11 arch=ppc64le:')
- patch('https://github.com/open-ce/pytorch-feedstock/raw/main/recipe/0311-PR66085-Remove-unused-dump-method-from-VSX-vec256-methods.patch',
- sha256='f05db59f3def4c4215db7142d81029c73fe330c660492159b66d65ca5001f4d1', when='@1.10.0: arch=ppc64le:')
+ patch('https://github.com/open-ce/pytorch-feedstock/raw/0a145060ca8523314ec3893af935c3b140e2d0b0/pytorch-1.10/recipe/0311-PR66085-Remove-unused-dump-method-from-VSX-vec256-methods.patch',
+ sha256='f05db59f3def4c4215db7142d81029c73fe330c660492159b66d65ca5001f4d1', when='@1.10:1.11 arch=ppc64le:')
- patch('https://github.com/open-ce/pytorch-feedstock/raw/main/recipe/0312-PR67331-Dummpy-VSX-bfloat16-implementation.patch',
- sha256='860b64afa85f5e6647ebc3c91d5a0bb258784770900c9302c3599c98d5cff1ee', when='@1.10.0: arch=ppc64le:')
+ patch('https://github.com/open-ce/pytorch-feedstock/raw/0a145060ca8523314ec3893af935c3b140e2d0b0/pytorch-1.10/recipe/0312-PR67331-Dummpy-VSX-bfloat16-implementation.patch',
+ sha256='860b64afa85f5e6647ebc3c91d5a0bb258784770900c9302c3599c98d5cff1ee', when='@1.10:1.11 arch=ppc64le:')
- patch('https://github.com/open-ce/pytorch-feedstock/raw/main/recipe/0313-add-missing-vsx-dispatch.patch',
- sha256='7393c2bc0b6d41ecc813c829a1e517bee864686652e91f174cb7bcdfb10ba451', when='@1.10.0: arch=ppc64le:')
+ patch('https://github.com/open-ce/pytorch-feedstock/raw/0a145060ca8523314ec3893af935c3b140e2d0b0/pytorch-1.10/recipe/0313-add-missing-vsx-dispatch.patch',
+ sha256='7393c2bc0b6d41ecc813c829a1e517bee864686652e91f174cb7bcdfb10ba451', when='@1.10:1.11 arch=ppc64le:')
+
+ patch('https://github.com/open-ce/pytorch-feedstock/raw/0a145060ca8523314ec3893af935c3b140e2d0b0/pytorch-1.12/recipe/0302-cpp-extension.patch',
+ sha256='2fac519cca8997f074c263505657ff867e7ba2d6637fc8bda99c70a99be0442a', when='@1.12: arch=ppc64le:')
# Cherry-pick a patch to allow earlier versions of PyTorch to work with CUDA 11.4
patch('https://github.com/pytorch/pytorch/commit/c74c0c571880df886474be297c556562e95c00e0.patch?full_index=1',