diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2022-11-07 19:42:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 19:42:35 -0800 |
commit | 54abc7fb7e4b3c6a639c60f0b086d9100c3daf1d (patch) | |
tree | 23e744eb17535989c7198476edb0d426a2fe0a13 | |
parent | 23eb2dc9d6cc8712872252c9cba94a876e0b6560 (diff) | |
download | spack-54abc7fb7e4b3c6a639c60f0b086d9100c3daf1d.tar.gz spack-54abc7fb7e4b3c6a639c60f0b086d9100c3daf1d.tar.bz2 spack-54abc7fb7e4b3c6a639c60f0b086d9100c3daf1d.tar.xz spack-54abc7fb7e4b3c6a639c60f0b086d9100c3daf1d.zip |
PyTorch: add v1.13.0 (#33596)
* PyTorch: add v1.13.0
* py-torchaudio: add v0.13.0
* py-torchaudio: add all versions
* py-torchvision: jpeg required for all backends
* py-torchtext: add v0.14.0
* py-torchtext: fix build
* py-torchaudio: fix build
* py-torchtext: update version tag
* Use Spack-built sox
* Explicitly disable sox build
* https -> http
7 files changed, 186 insertions, 65 deletions
diff --git a/var/spack/repos/builtin/packages/flac/package.py b/var/spack/repos/builtin/packages/flac/package.py index 0ff0527fe1..7d6f5b6bca 100644 --- a/var/spack/repos/builtin/packages/flac/package.py +++ b/var/spack/repos/builtin/packages/flac/package.py @@ -12,10 +12,10 @@ class Flac(AutotoolsPackage): homepage = "https://xiph.org/flac/index.html" url = "http://downloads.xiph.org/releases/flac/flac-1.3.2.tar.xz" + version("1.4.2", sha256="e322d58a1f48d23d9dd38f432672865f6f79e73a6f9cc5a5f57fcaa83eb5a8e4") version("1.3.3", sha256="213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748") version("1.3.2", sha256="91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f") version("1.3.1", sha256="4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c") version("1.3.0", sha256="fa2d64aac1f77e31dfbb270aeb08f5b32e27036a52ad15e69a77e309528010dc") - depends_on("libvorbis") - depends_on("id3lib") + depends_on("libogg@1.1.2:") diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 9e5a9a8cef..b6e5ed6b1f 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -24,6 +24,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): import_modules = ["torch", "torch.autograd", "torch.nn", "torch.utils"] version("master", branch="master", submodules=True) + version("1.13.0", tag="v1.13.0", submodules=True) version("1.12.1", tag="v1.12.1", submodules=True) version("1.12.0", tag="v1.12.0", submodules=True) version("1.11.0", tag="v1.11.0", submodules=True) @@ -115,11 +116,6 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): ) # Required dependencies - depends_on("cmake@3.13:", when="@1.11:", type="build") - depends_on("cmake@3.10:", when="@1.10:", type="build") - depends_on("cmake@3.5:", type="build") - # Use Ninja generator to speed up build times, automatically used if found - depends_on("ninja@1.5:", when="@1.1:", type="build") # See python_min_version in setup.py depends_on("python@3.7:", when="@1.11:", type=("build", "link", "run")) depends_on("python@3.6.2:", when="@1.7.1:", type=("build", "link", "run")) @@ -127,18 +123,35 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("python@3.5:", when="@1.5", type=("build", "link", "run")) depends_on("python@2.7:2,3.5:", when="@1.4", type=("build", "link", "run")) depends_on("python@2.7:2,3.5:3.7", when="@:1.3", type=("build", "link", "run")) + + # pyproject.toml depends_on("py-setuptools", type=("build", "run")) + depends_on("py-astunparse", when="@1.13:", type=("build", "run")) + depends_on("py-numpy@1.16.6:", type=("build", "run")) + depends_on("ninja@1.5:", when="@1.1:", type="build") + depends_on("py-pyyaml", type=("build", "run")) + depends_on("cmake@3.13:", when="@1.11:", type="build") + depends_on("cmake@3.10:", when="@1.10:", type="build") + depends_on("cmake@3.5:", type="build") + depends_on("py-cffi", type=("build", "run")) + depends_on("py-typing-extensions@3.6.2.1:", when="@1.7:", type=("build", "run")) depends_on("py-future", when="@1.5:", type=("build", "run")) depends_on("py-future", when="@1.1: ^python@:2", type=("build", "run")) - depends_on("py-pyyaml", type=("build", "run")) + depends_on("py-six", when="@1.13:", type=("build", "run")) + depends_on("py-requests", when="@1.13:", type=("build", "run")) + depends_on("py-dataclasses", when="@1.7: ^python@3.6", type=("build", "run")) + + # Undocumented dependencies depends_on("py-typing", when="^python@:3.4", type=("build", "run")) - depends_on("py-pybind11@2.6.2", when="@1.8:", type=("build", "link", "run")) + depends_on("py-tqdm", type="run") + depends_on("blas") + depends_on("lapack") + + # third_party + depends_on("py-pybind11@2.10.0", when="@1.13:", type=("build", "link", "run")) + depends_on("py-pybind11@2.6.2", when="@1.8:1.12", 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") - # 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:") @@ -147,19 +160,17 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # https://github.com/pytorch/pytorch/issues/78362 depends_on("py-protobuf@:3", type=("build", "run")) depends_on("protobuf@:3", type=("build", "run")) - depends_on("py-typing-extensions@3.6.2.1:", when="@1.7:", type=("build", "run")) - depends_on("blas") - depends_on("lapack") depends_on("eigen") # https://github.com/pytorch/pytorch/issues/60329 - # depends_on('cpuinfo@2020-12-17', when='@1.8:') - # depends_on('cpuinfo@2020-06-11', when='@1.6:1.7') + # depends_on("cpuinfo@2022-08-19", when="@1.13:") + # depends_on("cpuinfo@2020-12-17", when="@1.8:1.12") + # depends_on("cpuinfo@2020-06-11", when="@1.6:1.7") # https://github.com/shibatch/sleef/issues/427 - # depends_on('sleef@3.5.1_2020-12-22', when='@1.8:') + # depends_on("sleef@3.5.1_2020-12-22", when="@1.8:") # https://github.com/pytorch/pytorch/issues/60334 - # depends_on('sleef@3.4.0_2019-07-30', when='@1.6:1.7') + # depends_on("sleef@3.4.0_2019-07-30", when="@1.6:1.7") # https://github.com/Maratyszcza/FP16/issues/18 - # depends_on('fp16@2020-05-14', when='@1.6:') + # depends_on("fp16@2020-05-14", when="@1.6:") depends_on("pthreadpool@2021-04-13", when="@1.9:") depends_on("pthreadpool@2020-10-05", when="@1.8") depends_on("pthreadpool@2020-06-15", when="@1.6:1.7") @@ -198,22 +209,24 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("miopen-hip") depends_on("rocminfo") # https://github.com/pytorch/pytorch/issues/60332 - # depends_on('xnnpack@2022-02-16', when='@1.12:+xnnpack') - # depends_on('xnnpack@2021-06-21', when='@1.10:1.11+xnnpack') - # depends_on('xnnpack@2021-02-22', when='@1.8:1.9+xnnpack') - # depends_on('xnnpack@2020-03-23', when='@1.6:1.7+xnnpack') + # depends_on("xnnpack@2022-02-16", when="@1.12:+xnnpack") + # depends_on("xnnpack@2021-06-21", when="@1.10:1.11+xnnpack") + # depends_on("xnnpack@2021-02-22", when="@1.8:1.9+xnnpack") + # depends_on("xnnpack@2020-03-23", when="@1.6:1.7+xnnpack") depends_on("mpi", when="+mpi") # https://github.com/pytorch/pytorch/issues/60270 - # depends_on('gloo@2021-05-21', when='@1.10:+gloo') - # depends_on('gloo@2021-05-04', when='@1.9+gloo') - # depends_on('gloo@2020-09-18', when='@1.7:1.8+gloo') - # depends_on('gloo@2020-03-17', when='@1.6+gloo') + # depends_on("gloo@2022-05-18", when="@1.13:+gloo") + # depends_on("gloo@2021-05-21", when="@1.10:1.12+gloo") + # depends_on("gloo@2021-05-04", when="@1.9+gloo") + # depends_on("gloo@2020-09-18", when="@1.7:1.8+gloo") + # depends_on("gloo@2020-03-17", when="@1.6+gloo") # https://github.com/pytorch/pytorch/issues/60331 - # depends_on('onnx@1.11.0', when='@1.12:+onnx_ml') - # depends_on('onnx@1.10.1_2021-10-08', when='@1.11+onnx_ml') - # depends_on('onnx@1.10.1', when='@1.10+onnx_ml') - # depends_on('onnx@1.8.0_2020-11-03', when='@1.8:1.9+onnx_ml') - # depends_on('onnx@1.7.0_2020-05-31', when='@1.6:1.7+onnx_ml') + # depends_on("onnx!1.12.0", when="@1.13:+onnx_ml") + # depends_on("onnx@1.11.0", when="@1.12+onnx_ml") + # depends_on("onnx@1.10.1_2021-10-08", when="@1.11+onnx_ml") + # depends_on("onnx@1.10.1", when="@1.10+onnx_ml") + # depends_on("onnx@1.8.0_2020-11-03", when="@1.8:1.9+onnx_ml") + # depends_on("onnx@1.7.0_2020-05-31", when="@1.6:1.7+onnx_ml") depends_on("mkl", when="+mkldnn") # Test dependencies @@ -247,7 +260,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # Fixes fatal error: sleef.h: No such file or directory # https://github.com/pytorch/pytorch/pull/35359 # https://github.com/pytorch/pytorch/issues/26555 - # patch('sleef.patch', when='@:1.5') + # patch("sleef.patch", when="@:1.5") # Fixes compilation with Clang 9.0.0 and Apple Clang 11.0.3 # https://github.com/pytorch/pytorch/pull/37086 @@ -510,24 +523,24 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): if self.spec.satisfies("@1.10:"): env.set("USE_SYSTEM_PYBIND11", "ON") # https://github.com/pytorch/pytorch/issues/60334 - # if self.spec.satisfies('@1.8:'): - # env.set('USE_SYSTEM_SLEEF', 'ON') + # if self.spec.satisfies("@1.8:"): + # env.set("USE_SYSTEM_SLEEF", "ON") if self.spec.satisfies("@1.6:"): - # env.set('USE_SYSTEM_LIBS', 'ON') + # env.set("USE_SYSTEM_LIBS", "ON") # https://github.com/pytorch/pytorch/issues/60329 - # env.set('USE_SYSTEM_CPUINFO', 'ON') + # env.set("USE_SYSTEM_CPUINFO", "ON") # https://github.com/pytorch/pytorch/issues/60270 - # env.set('USE_SYSTEM_GLOO', 'ON') + # env.set("USE_SYSTEM_GLOO", "ON") # https://github.com/Maratyszcza/FP16/issues/18 - # env.set('USE_SYSTEM_FP16', 'ON') + # env.set("USE_SYSTEM_FP16", "ON") env.set("USE_SYSTEM_PTHREADPOOL", "ON") env.set("USE_SYSTEM_PSIMD", "ON") env.set("USE_SYSTEM_FXDIV", "ON") env.set("USE_SYSTEM_BENCHMARK", "ON") # https://github.com/pytorch/pytorch/issues/60331 - # env.set('USE_SYSTEM_ONNX', 'ON') + # env.set("USE_SYSTEM_ONNX", "ON") # https://github.com/pytorch/pytorch/issues/60332 - # env.set('USE_SYSTEM_XNNPACK', 'ON') + # env.set("USE_SYSTEM_XNNPACK", "ON") @run_before("install") def build_amd(self): diff --git a/var/spack/repos/builtin/packages/py-torchaudio/package.py b/var/spack/repos/builtin/packages/py-torchaudio/package.py index 9fb103095e..83e16bcf6c 100644 --- a/var/spack/repos/builtin/packages/py-torchaudio/package.py +++ b/var/spack/repos/builtin/packages/py-torchaudio/package.py @@ -20,10 +20,80 @@ class PyTorchaudio(PythonPackage): extension.""" homepage = "https://github.com/pytorch/audio" - url = "https://github.com/pytorch/audio/archive/v0.4.0.tar.gz" + git = "https://github.com/pytorch/audio.git" - version("0.4.0", sha256="9361312319b1ab880fc348ea82b024053bca6faf477ef6a9232a5b805742dc66") + version("main", branch="main", submodules=True) + version("0.13.0", tag="v0.13.0", submodules=True) + version("0.12.1", tag="v0.12.1", submodules=True) + version("0.12.0", tag="v0.12.0", submodules=True) + version("0.11.0", tag="v0.11.0", submodules=True) + version("0.10.2", tag="v0.10.2", submodules=True) + version("0.10.1", tag="v0.10.1", submodules=True) + version("0.10.0", tag="v0.10.0", submodules=True) + version("0.9.1", tag="v0.9.1", submodules=True) + version("0.9.0", tag="v0.9.0", submodules=True) + version("0.8.2", tag="v0.8.2", submodules=True) + version("0.8.1", tag="v0.8.1", submodules=True) + version("0.8.0", tag="v0.8.0", submodules=True) + version("0.7.2", tag="v0.7.2", submodules=True) + version("0.7.0", tag="v0.7.0", submodules=True) + version("0.6.0", tag="v0.6.0", submodules=True) + version("0.5.1", tag="v0.5.1", submodules=True) + version("0.5.0", tag="v0.5.0", submodules=True) + version("0.4.0", tag="v0.4.0", submodules=True) + # https://github.com/pytorch/audio#dependencies + depends_on("python@3.7:3.10", when="@0.12:", type=("build", "link", "run")) + depends_on("python@3.7:3.9", when="@0.11", type=("build", "link", "run")) + depends_on("python@3.6:3.9", when="@0.7.2:0.10", type=("build", "link", "run")) + depends_on("python@3.6:3.8", when="@0.6:0.7.0", type=("build", "link", "run")) + depends_on("python@3.5:3.8", when="@0.5", type=("build", "link", "run")) + depends_on("python@2.7,3.5:3.8", when="@0.4", type=("build", "link", "run")) + + depends_on("cmake@3.18:", when="@0.10:", type="build") + depends_on("cmake@3.5:", when="@0.8:", type="build") + depends_on("ninja", when="@0.8:", type="build") depends_on("py-setuptools", type="build") - depends_on("sox@14.3.2:") - depends_on("py-torch@1.2.0:", type=("build", "run")) + depends_on("py-pybind11", when="@0.12:", type=("build", "link")) + depends_on("pkgconfig", type="build") + depends_on("sox") + + # https://github.com/pytorch/audio#dependencies + depends_on("py-torch@master", when="@main", type=("build", "link", "run")) + depends_on("py-torch@1.13.0", when="@0.13.0", type=("build", "link", "run")) + depends_on("py-torch@1.12.1", when="@0.12.1", type=("build", "link", "run")) + depends_on("py-torch@1.12.0", when="@0.12.0", type=("build", "link", "run")) + depends_on("py-torch@1.11.0", when="@0.11.0", type=("build", "link", "run")) + depends_on("py-torch@1.10.2", when="@0.10.2", type=("build", "link", "run")) + depends_on("py-torch@1.10.1", when="@0.10.1", type=("build", "link", "run")) + depends_on("py-torch@1.10.0", when="@0.10.0", type=("build", "link", "run")) + depends_on("py-torch@1.9.1", when="@0.9.1", type=("build", "link", "run")) + depends_on("py-torch@1.9.0", when="@0.9.0", type=("build", "link", "run")) + depends_on("py-torch@1.8.2", when="@0.8.2", type=("build", "link", "run")) + depends_on("py-torch@1.8.1", when="@0.8.1", type=("build", "link", "run")) + depends_on("py-torch@1.8.0", when="@0.8.0", type=("build", "link", "run")) + depends_on("py-torch@1.7.1", when="@0.7.2", type=("build", "link", "run")) + depends_on("py-torch@1.7.0", when="@0.7.0", type=("build", "link", "run")) + depends_on("py-torch@1.6.0", when="@0.6.0", type=("build", "link", "run")) + depends_on("py-torch@1.5.1", when="@0.5.1", type=("build", "link", "run")) + depends_on("py-torch@1.5.0", when="@0.5.0", type=("build", "link", "run")) + depends_on("py-torch@1.4.1", when="@0.4.0", type=("build", "link", "run")) + + def setup_build_environment(self, env): + # tools/setup_helpers/extension.py + env.set("BUILD_SOX", 0) + + if "+cuda" in self.spec["py-torch"]: + env.set("USE_CUDA", 1) + torch_cuda_arch_list = ";".join( + "{0:.1f}".format(float(i) / 10.0) + for i in self.spec["py-torch"].variants["cuda_arch"].value + ) + env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch_list) + else: + env.set("USE_CUDA", 0) + + if "+rocm" in self.spec["py-torch"]: + env.set("USE_ROCM", 1) + else: + env.set("USE_ROCM", 0) diff --git a/var/spack/repos/builtin/packages/py-torchdata/package.py b/var/spack/repos/builtin/packages/py-torchdata/package.py index d61dbf9734..0d674e7d75 100644 --- a/var/spack/repos/builtin/packages/py-torchdata/package.py +++ b/var/spack/repos/builtin/packages/py-torchdata/package.py @@ -24,7 +24,7 @@ class PyTorchdata(PythonPackage): # https://github.com/pytorch/data#version-compatibility depends_on("python@3.7:3.10", type=("build", "run")) depends_on("py-torch@master", when="@main", type=("build", "run")) - depends_on("py-torch@1.12.1", when="@0.5.0", type=("build", "run")) # ? + depends_on("py-torch@1.13.0", when="@0.5.0", type=("build", "run")) depends_on("py-torch@1.12.1", when="@0.4.1", type=("build", "run")) depends_on("py-torch@1.12.0", when="@0.4.0", type=("build", "run")) depends_on("py-torch@1.11.0", when="@0.3.0", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-torchtext/package.py b/var/spack/repos/builtin/packages/py-torchtext/package.py index e9008168e5..a22bfa53f1 100644 --- a/var/spack/repos/builtin/packages/py-torchtext/package.py +++ b/var/spack/repos/builtin/packages/py-torchtext/package.py @@ -11,17 +11,52 @@ class PyTorchtext(PythonPackage): """Text utilities and datasets for PyTorch.""" homepage = "https://github.com/pytorch/text" - pypi = "torchtext/torchtext-0.5.0.tar.gz" + git = "https://github.com/pytorch/text.git" maintainers = ["adamjstewart"] - version("0.5.0", sha256="7f22e24e9b939fff56b9118c78dc07aafec8dcc67164de15b9b5ed339e4179c6") - - depends_on("python@2.7:2.8,3.5:", type=("build", "run")) + version("main", branch="main", submodules=True) + version("0.14.0", tag="v0.14.0", submodules=True) + version("0.13.1", tag="v0.13.1", submodules=True) + version("0.13.0", tag="v0.13.0", submodules=True) + version("0.12.0", tag="v0.12.0", submodules=True) + version("0.11.2", tag="v0.11.2", submodules=True) + version("0.11.1", tag="v0.11.1", submodules=True) + version("0.10.1", tag="v0.10.1", submodules=True) + version("0.10.0", tag="v0.10.0", submodules=True) + version("0.9.2", tag="v0.9.2", submodules=True) + version("0.8.1", tag="v0.8.1", submodules=True) + version("0.6.0", tag="0.6.0", submodules=True) + version("0.5.0", tag="0.5.0", submodules=True) + + # https://github.com/pytorch/text#installation + depends_on("python@3.7:3.10", when="@0.13:", type=("build", "link", "run")) + depends_on("python@3.6:3.9", when="@0.8.1:0.12", type=("build", "link", "run")) + depends_on("python@3.6:3.8", when="@0.7:0.8.0", type=("build", "link", "run")) + depends_on("python@3.5:3.8", when="@0.6", type=("build", "link", "run")) + depends_on("python@2.7,3.5:3.8", when="@:0.5", type=("build", "link", "run")) + + depends_on("cmake@3.18:", when="@0.13:", type="build") + depends_on("ninja", when="@0.13:", type="build") + depends_on("py-pybind11", when="@0.8:", type=("build", "link")) depends_on("py-setuptools", type="build") depends_on("py-tqdm", type=("build", "run")) depends_on("py-requests", type=("build", "run")) - depends_on("py-torch@0.4.0:", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) - depends_on("py-six", type=("build", "run")) - depends_on("py-sentencepiece", type=("build", "run")) + depends_on("py-six", when="@:0.6", type=("build", "run")) + depends_on("py-sentencepiece", when="@:0.7", type=("build", "run")) + + # https://github.com/pytorch/text#installation + depends_on("py-torch@master", when="@main", type=("build", "link", "run")) + depends_on("py-torch@1.13.0", when="@0.14.0", type=("build", "link", "run")) + depends_on("py-torch@1.12.1", when="@0.13.1", type=("build", "link", "run")) + depends_on("py-torch@1.12.0", when="@0.13.0", type=("build", "link", "run")) + depends_on("py-torch@1.11.0", when="@0.12.0", type=("build", "link", "run")) + depends_on("py-torch@1.10.2", when="@0.11.2", type=("build", "link", "run")) + depends_on("py-torch@1.10.1", when="@0.11.1", type=("build", "link", "run")) + depends_on("py-torch@1.9.1", when="@0.10.1", type=("build", "link", "run")) + depends_on("py-torch@1.9.0", when="@0.10.0", type=("build", "link", "run")) + depends_on("py-torch@1.8.2", when="@0.9.2", type=("build", "link", "run")) + depends_on("py-torch@1.7.1", when="@0.8.1", type=("build", "link", "run")) + depends_on("py-torch@1.5.0", when="@0.6.0", type=("build", "link", "run")) + depends_on("py-torch@1.4.1", when="@0.5.0", type=("build", "link", "run")) diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index 273732995a..e1e58b7ccd 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -18,6 +18,7 @@ class PyTorchvision(PythonPackage): maintainers = ["adamjstewart"] version("main", branch="main") + version("0.14.0", sha256="be1621c85c56eb40537cb74e6ec5d8e58ed8b69f8374a58bcb6ec413cb540c8b") version("0.13.1", sha256="c32fab734e62c7744dadeb82f7510ff58cc3bca1189d17b16aa99b08afc42249") version("0.13.0", sha256="2fe9139150800820d02c867a0b64b7c7fbc964d48d76fae235d6ef9215eabcf4") version("0.12.0", sha256="99e6d3d304184895ff4f6152e2d2ec1cbec89b3e057d9c940ae0125546b04e91") @@ -47,7 +48,12 @@ class PyTorchvision(PythonPackage): "backend", default="pil", description="Image backend", - values=("pil", "accimage", "png", "jpeg"), + values=[ + "pil", + "accimage", + conditional("png", when="@0.8:"), + conditional("jpeg", when="@0.8:"), + ], multi=False, ) @@ -68,6 +74,7 @@ class PyTorchvision(PythonPackage): # https://github.com/pytorch/vision#installation depends_on("py-torch@master", when="@main", type=("build", "link", "run")) + depends_on("py-torch@1.13.0", when="@0.14.0", type=("build", "link", "run")) depends_on("py-torch@1.12.1", when="@0.13.1", type=("build", "link", "run")) depends_on("py-torch@1.12.0", when="@0.13.0", type=("build", "link", "run")) depends_on("py-torch@1.11.0", when="@0.12.0", type=("build", "link", "run")) @@ -102,15 +109,12 @@ class PyTorchvision(PythonPackage): depends_on("pil@5.3:8.2,8.4:", when="@0.13: backend=pil", type=("build", "run")) depends_on("py-accimage", when="backend=accimage", type=("build", "run")) depends_on("libpng@1.6.0:", when="backend=png") - depends_on("jpeg") - - # Many of the datasets require additional dependencies to use. - # These can be installed after the fact. + depends_on("jpeg") # seems to be required for all backends depends_on("ffmpeg@3.1:", when="@0.4.2:") - conflicts("backend=png", when="@:0.7") - conflicts("backend=jpeg", when="@:0.7") + # Many of the datasets require additional dependencies to use. + # These can be installed after the fact. def setup_build_environment(self, env): include = [] @@ -138,10 +142,10 @@ class PyTorchvision(PythonPackage): if "+cuda" in self.spec["py-torch"]: env.set("FORCE_CUDA", 1) env.set("CUDA_HOME", self.spec["cuda"].prefix) - pytorch_cuda_arch = ";".join( + torch_cuda_arch_list = ";".join( "{0:.1f}".format(float(i) / 10.0) for i in self.spec["py-torch"].variants["cuda_arch"].value ) - env.set("TORCH_CUDA_ARCH_LIST", pytorch_cuda_arch) + env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch_list) else: env.set("FORCE_CUDA", 0) diff --git a/var/spack/repos/builtin/packages/sox/package.py b/var/spack/repos/builtin/packages/sox/package.py index 3cbb9ab3d1..8e4315a885 100644 --- a/var/spack/repos/builtin/packages/sox/package.py +++ b/var/spack/repos/builtin/packages/sox/package.py @@ -18,7 +18,6 @@ class Sox(AutotoolsPackage): depends_on("bzip2") depends_on("flac") - depends_on("id3lib") depends_on("libvorbis") depends_on("opus") depends_on("lame", when="+mp3") |