diff options
5 files changed, 61 insertions, 13 deletions
diff --git a/var/spack/repos/builtin/packages/cpuinfo/package.py b/var/spack/repos/builtin/packages/cpuinfo/package.py index fd990da38a..eb1d9ada70 100644 --- a/var/spack/repos/builtin/packages/cpuinfo/package.py +++ b/var/spack/repos/builtin/packages/cpuinfo/package.py @@ -19,7 +19,8 @@ class Cpuinfo(CMakePackage): license("BSD-2-Clause") version("main", branch="main") - version("2023-11-04", commit="d6860c477c99f1fce9e28eb206891af3c0e1a1d7") # py-torch@2.3: + version("2024-08-30", commit="fa1c679da8d19e1d87f20175ae1ec10995cd3dd3") # py-torch@2.5: + version("2023-11-04", commit="d6860c477c99f1fce9e28eb206891af3c0e1a1d7") # py-torch@2.3:2.4 version("2023-01-13", commit="6481e8bef08f606ddd627e4d3be89f64d62e1b8a") # py-torch@2.1:2.2 version("2022-08-19", commit="8ec7bd91ad0470e61cf38f618cc1f270dede599c") # py-torch@1.13:2.0 version("2020-12-17", commit="5916273f79a21551890fd3d56fc5375a78d1598d") # py-torch@1.8:1.12 @@ -30,8 +31,8 @@ class Cpuinfo(CMakePackage): version("2018-05-13", commit="1e6c8c99d27f2b5eb9d2e6231055c6a4115b85e5") # py-torch@0.4.1 version("2018-04-04", commit="831dc28341b5f20d13e840caf87eaba644d82643") # py-torch@:0.4.0 - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") generator("ninja") depends_on("cmake@3.5:", type="build") diff --git a/var/spack/repos/builtin/packages/libavif/package.py b/var/spack/repos/builtin/packages/libavif/package.py new file mode 100644 index 0000000000..5889f39d40 --- /dev/null +++ b/var/spack/repos/builtin/packages/libavif/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class Libavif(CMakePackage): + """libavif - Library for encoding and decoding .avif files.""" + + homepage = "https://github.com/AOMediaCodec/libavif" + url = "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.1.1.tar.gz" + + license("bsd-2-clause") + + version("1.1.1", sha256="914662e16245e062ed73f90112fbb4548241300843a7772d8d441bb6859de45b") + + depends_on("c", type="build") + depends_on("cxx", type="build") + + depends_on("cmake@3.13:", type="build") + + def cmake_args(self): + return [ + self.define("AVIF_JPEG", False), + self.define("AVIF_LIBYUV", False), + self.define("AVIF_ZLIBPNG", False), + ] diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 8b35838496..7025196942 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -17,15 +17,15 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): git = "https://github.com/pytorch/pytorch.git" submodules = True - maintainers("adamjstewart") - # Exact set of modules is version- and variant-specific, just attempt to import the # core libraries to ensure that the package was successfully installed. import_modules = ["torch", "torch.autograd", "torch.nn", "torch.utils"] license("BSD-3-Clause") + maintainers("adamjstewart") version("main", branch="main") + version("2.5.0", tag="v2.5.0", commit="32f585d9346e316e554c8d9bf7548af9f62141fc") version("2.4.1", tag="v2.4.1", commit="ee1b6804381c57161c477caa380a840a84167676") version("2.4.0", tag="v2.4.0", commit="d990dada86a8ad94882b5c23e859b88c0c255bda") version("2.3.1", tag="v2.3.1", commit="63d5e9221bedd1546b7d364b5ce4171547db12a9") @@ -137,7 +137,8 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # Required dependencies # Based on PyPI wheel availability with default_args(type=("build", "link", "run")): - depends_on("python@3.8:3.12", when="@2.2:") + depends_on("python@3.9:3.13", when="@2.5:") + depends_on("python@3.8:3.12", when="@2.2:2.4") depends_on("python@3.8:3.11", when="@2.0:2.1") depends_on("python@:3.10", when="@1.11:1") depends_on("python@:3.9", when="@1.7.1:1.10") @@ -186,7 +187,8 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # 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("benchmark", when="@1.6:+test") - depends_on("cpuinfo@2023-11-04", when="@2.3:") + depends_on("cpuinfo@2024-08-30", when="@2.5:") + depends_on("cpuinfo@2023-11-04", when="@2.3:2.4") depends_on("cpuinfo@2023-01-13", when="@2.1:2.2") depends_on("cpuinfo@2022-08-19", when="@1.13:2.0") depends_on("cpuinfo@2020-12-17", when="@1.8:1.12") @@ -230,7 +232,8 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("pthreadpool@2020-10-05", when="@1.8") depends_on("pthreadpool@2020-06-15", when="@1.6:1.7") with default_args(type=("build", "link", "run")): - depends_on("py-pybind11@2.12.0:", when="@2.3:") + depends_on("py-pybind11@2.13.5:", when="@2.5:") + depends_on("py-pybind11@2.12.0:", when="@2.3:2.4") depends_on("py-pybind11@2.11.0:", when="@2.1:2.2") depends_on("py-pybind11@2.10.1:", when="@2.0") depends_on("py-pybind11@2.10.0:", when="@1.13:1") diff --git a/var/spack/repos/builtin/packages/py-torchaudio/package.py b/var/spack/repos/builtin/packages/py-torchaudio/package.py index 372cbca936..dc2a088fbc 100644 --- a/var/spack/repos/builtin/packages/py-torchaudio/package.py +++ b/var/spack/repos/builtin/packages/py-torchaudio/package.py @@ -18,6 +18,7 @@ class PyTorchaudio(PythonPackage): maintainers("adamjstewart") version("main", branch="main") + version("2.5.0", tag="v2.5.0", commit="56bc006d56a0d4960de6a1e0b6340cba4eda05cd") version("2.4.1", tag="v2.4.1", commit="e8cbe17769796ce963fbc71b8990f1474774e6d2") version("2.4.0", tag="v2.4.0", commit="69d40773dc4ed86643820c21a8a880e4d074a46e") version("2.3.1", tag="v2.3.1", commit="3edcf69e78a3c9a3077a11159861422440ec7d4a") @@ -55,13 +56,15 @@ class PyTorchaudio(PythonPackage): with default_args(type=("build", "link", "run")): # Based on PyPI wheel availability - depends_on("python@3.8:3.12", when="@2.2:") + depends_on("python@3.9:3.12", when="@2.5:") + depends_on("python@3.8:3.12", when="@2.2:2.4") depends_on("python@3.8:3.11", when="@2.0:2.1") depends_on("python@:3.10", when="@0.12:0") depends_on("python@:3.9", when="@0.7.2:0.11") depends_on("python@:3.8", when="@:0.7.0") depends_on("py-torch@main", when="@main") + depends_on("py-torch@2.5.0", when="@2.5.0") depends_on("py-torch@2.4.1", when="@2.4.1") depends_on("py-torch@2.4.0", when="@2.4.0") depends_on("py-torch@2.3.1", when="@2.3.1") diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index 1f17b6529d..93cf33fb1b 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -19,6 +19,7 @@ class PyTorchvision(PythonPackage): license("BSD-3-Clause") version("main", branch="main") + version("0.20.0", sha256="b59d9896c5c957c6db0018754bbd17d079c5102b82b9be0b438553b40a7b6029") version("0.19.1", sha256="083e75c467285595ec3eb3c7aa8493c19e53d7eb42f13046fb56a07c8897e5a8") version("0.19.0", sha256="4c499d0a412b5a21d55ac3c0a37e80ecd7e1f002f2a7b6b3b38a2de2544acbb6") version("0.18.1", sha256="347d472a9ceecc44e0bee1eda140d63cfaffc74a54ec07d4b98da7698ce75516") @@ -58,16 +59,21 @@ class PyTorchvision(PythonPackage): desc = "Enable support for native encoding/decoding of {} formats in torchvision.io" variant("png", default=True, description=desc.format("PNG")) variant("jpeg", default=True, description=desc.format("JPEG")) + variant("webp", default=False, description=desc.format("WEBP"), when="@0.20:") + variant("heic", default=False, description=desc.format("HEIC"), when="@0.20:") + variant("avif", default=False, description=desc.format("AVIF"), when="@0.20:") variant("nvjpeg", default=False, description=desc.format("NVJPEG")) - variant("ffmpeg", default=False, description=desc.format("FFMPEG")) variant("video_codec", default=False, description=desc.format("video_codec")) + variant("ffmpeg", default=False, description=desc.format("FFMPEG")) + # torchvision does not yet support disabling giflib: # https://github.com/pytorch/vision/pull/8406#discussion_r1590926939 # variant("gif", default=False, description=desc.format("GIF"), when="@0.19:") with default_args(type=("build", "link", "run")): # Based on PyPI wheel availability - depends_on("python@3.8:3.12", when="@0.17:") + depends_on("python@3.9:3.12", when="@0.20:") + depends_on("python@3.8:3.12", when="@0.17:0.19") depends_on("python@3.8:3.11", when="@0.15:0.16") depends_on("python@:3.10", when="@0.12:0.14") depends_on("python@:3.9", when="@0.8.2:0.11") @@ -75,6 +81,7 @@ class PyTorchvision(PythonPackage): # https://github.com/pytorch/vision#installation depends_on("py-torch@main", when="@main") + depends_on("py-torch@2.5.0", when="@0.20.0") depends_on("py-torch@2.4.1", when="@0.19.1") depends_on("py-torch@2.4.0", when="@0.19.0") depends_on("py-torch@2.3.1", when="@0.18.1") @@ -122,9 +129,13 @@ class PyTorchvision(PythonPackage): # Extensions depends_on("libpng@1.6:", when="+png") depends_on("jpeg", when="+jpeg") + depends_on("libwebp", when="+webp") + depends_on("libheif", when="+heic") + depends_on("libavif", when="+avif") depends_on("cuda", when="+nvjpeg") - depends_on("ffmpeg@3.1:", when="+ffmpeg") depends_on("cuda", when="+video_codec") + depends_on("ffmpeg@3.1:", when="+ffmpeg") + # torchvision does not yet support externally-installed giflib: # https://github.com/pytorch/vision/pull/8406#discussion_r1590926939 # depends_on("giflib", when="+gif") @@ -177,7 +188,8 @@ class PyTorchvision(PythonPackage): for gpu in ["cuda", "mps"]: env.set(f"FORCE_{gpu.upper()}", int(f"+{gpu}" in self.spec["py-torch"])) - for extension in ["png", "jpeg", "nvjpeg", "ffmpeg", "video_codec"]: + extensions = ["png", "jpeg", "webp", "heic", "avif", "nvjpeg", "video_codec", "ffmpeg"] + for extension in extensions: env.set(f"TORCHVISION_USE_{extension.upper()}", int(f"+{extension}" in self.spec)) include = [] |