From f3139555b11276c32dc574d52e1a4dc29cb25ada Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 6 Feb 2022 23:33:12 -0600 Subject: py-torch: update dep constraints (#28743) The version of the ONNX submodule was updated between the PyTorch 1.9 and 1.10 releases, which fixed builds with newer protobuf but broke builds with older protobuf. Also this adds minimum version reqs for numpy/typing-extensions (which were not present before). --- var/spack/repos/builtin/packages/py-torch/package.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index fafd490530..94242beeaf 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -101,15 +101,18 @@ class PyTorch(PythonPackage, CudaPackage): depends_on('py-future', when='@1.1: ^python@:2', type=('build', 'run')) depends_on('py-pyyaml', type=('build', 'run')) depends_on('py-typing', when='^python@:3.4', type=('build', 'run')) - depends_on('py-typing-extensions', when='@1.7:', type=('build', 'run')) depends_on('py-pybind11@2.6.2', when='@1.8:', type=('build', 'link', 'run')) depends_on('py-pybind11@2.3.0', when='@1.1:1.7', type=('build', 'link', 'run')) depends_on('py-pybind11@2.2.4', when='@:1.0', type=('build', 'link', 'run')) depends_on('py-dataclasses', when='@1.7: ^python@3.6', type=('build', 'run')) depends_on('py-tqdm', type='run') - depends_on('py-protobuf', type=('build', 'run')) - # https://github.com/spack/spack/issues/28679 - depends_on('protobuf@:3.14') + # https://github.com/onnx/onnx#prerequisites + depends_on('py-numpy@1.16.6:', type=('build', 'run')) + depends_on('py-protobuf@3.12.2:', when='@1.10:', type=('build', 'run')) + depends_on('py-protobuf@:3.14', when='@:1.9', type=('build', 'run')) + depends_on('protobuf@3.12.2:', when='@1.10:') + depends_on('protobuf@:3.14', when='@:1.9') + depends_on('py-typing-extensions@3.6.2.1:', when='@1.7:', type=('build', 'run')) depends_on('blas') depends_on('lapack') depends_on('eigen') @@ -141,7 +144,6 @@ class PyTorch(PythonPackage, CudaPackage): depends_on('magma', when='+magma') depends_on('nccl', when='+nccl') depends_on('numactl', when='+numa') - depends_on('py-numpy', when='+numpy', type=('build', 'run')) depends_on('llvm-openmp', when='%apple-clang +openmp') depends_on('valgrind', when='+valgrind') # https://github.com/pytorch/pytorch/issues/60332 -- cgit v1.2.3-70-g09d2