From 87dca0130c489f407f4fed90ab0298222067e81c Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Thu, 13 Apr 2023 21:25:58 -0500 Subject: [PATCH] (py-)onnx: new version 1.13.0, 1.13.1 (for py-torch@2) (#36797) * (py-)onnx: new version 1.13.0, 1.13.1 (for py-torch@2) ONNX has a new version 1.13.1 which is required for py-torch +onnx_ml. This version adds python 3.11 support, Mac M1/M2 support. No build system changes changes. - https://github.com/onnx/onnx/releases/tag/v1.13.0 (main changes) - https://github.com/onnx/onnx/releases/tag/v1.13.1 (bugfixes) - https://github.com/onnx/onnx/commits/main/CMakeLists.txt (top 6 commits are on top of the last 1.12 release) - https://github.com/onnx/onnx/blob/v1.13.1/requirements.txt - https://github.com/onnx/onnx/blob/v1.13.1/requirements-release.txt * py-onnx: update dependencies * Apply suggestions from code review Co-authored-by: Adam J. Stewart * protobuf: new version 3.22.2, depends_on abseil-cpp * onnx: require c++14 for protobuf * py-protobuf: new preferred version 3.20.3 * protobuf: new versions 3.20.2, 3.20.3 * [@spackbot] updating style on behalf of wdconinc * protobuf: no double depends_on abseil-cpp * py-protobuf: no preferred 3.20.3 --------- Co-authored-by: Adam J. Stewart Co-authored-by: wdconinc --- var/spack/repos/builtin/packages/onnx/package.py | 8 ++++++++ var/spack/repos/builtin/packages/protobuf/package.py | 2 ++ var/spack/repos/builtin/packages/py-onnx/package.py | 8 ++++++-- var/spack/repos/builtin/packages/py-protobuf/package.py | 2 ++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/onnx/package.py b/var/spack/repos/builtin/packages/onnx/package.py index 3fad7d5b85..8e01b481bb 100644 --- a/var/spack/repos/builtin/packages/onnx/package.py +++ b/var/spack/repos/builtin/packages/onnx/package.py @@ -18,6 +18,10 @@ class Onnx(CMakePackage): git = "https://github.com/onnx/onnx.git" version("master", branch="master") + version( + "1.13.1", sha256="090d3e10ec662a98a2a72f1bf053f793efc645824f0d4b779e0ce47468a0890e" + ) # py-torch@2: + version("1.13.0", sha256="66eb61fc0ff4b6189816eb8e4da52e1e6775a1c29f372cbd08b694aa5b4ca978") version("1.12.0", sha256="052ad3d5dad358a33606e0fc89483f8150bb0655c99b12a43aa58b5b7f0cc507") version( "1.11.0", sha256="a20f2d9df805b16ac75ab4da0a230d3d1c304127d719e5c66a4e6df514e7f6c0" @@ -55,6 +59,10 @@ class Onnx(CMakePackage): depends_on("python", type="build") depends_on("protobuf") + def patch(self): + if self.spec.satisfies("@1.13 ^protobuf@3.22:"): + filter_file("CMAKE_CXX_STANDARD 11", "CMAKE_CXX_STANDARD 14", "CMakeLists.txt") + def cmake_args(self): # Try to get ONNX to use the same version of python as the spec is using args = ["-DPY_VERSION={0}".format(self.spec["python"].version.up_to(2))] diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py index a9378cef4c..a7bab9e6b8 100644 --- a/var/spack/repos/builtin/packages/protobuf/package.py +++ b/var/spack/repos/builtin/packages/protobuf/package.py @@ -23,6 +23,8 @@ class Protobuf(CMakePackage): version("3.21.3", sha256="c29d8b4b79389463c546f98b15aa4391d4ed7ec459340c47bffe15db63eb9126") version("3.21.2", sha256="66e1156ac78290db81335c79d1fc5a54123ebb62a43eb2e5b42a44ca23087517") version("3.21.1", sha256="a295dd3b9551d3e2749a9969583dea110c6cdcc39d02088f7c7bb1100077e081") + version("3.20.3", sha256="9c0fd39c7a08dff543c643f0f4baf081988129a411b977a07c46221793605638") + version("3.20.2", sha256="88231778cffebf93bc905e76ea757fae0f2ef497cc00f64973e41f1acd4fc781") version("3.20.1", sha256="8b28fdd45bab62d15db232ec404248901842e5340299a57765e48abe8a80d930") version("3.20.0", sha256="b07772d38ab07e55eca4d50f4b53da2d998bb221575c60a4f81100242d4b4889") version("3.19.4", sha256="3bd7828aa5af4b13b99c191e8b1e884ebfa9ad371b0ce264605d347f135d2568") diff --git a/var/spack/repos/builtin/packages/py-onnx/package.py b/var/spack/repos/builtin/packages/py-onnx/package.py index 9f3a809a77..debc723696 100644 --- a/var/spack/repos/builtin/packages/py-onnx/package.py +++ b/var/spack/repos/builtin/packages/py-onnx/package.py @@ -19,6 +19,8 @@ class PyOnnx(PythonPackage): homepage = "https://github.com/onnx/onnx" pypi = "Onnx/onnx-1.6.0.tar.gz" + version("1.13.1", sha256="0bdcc25c2c1ce4a8750e4ffbd93ae945442e7fac6e51176f38e366b74a97dfd9") + version("1.13.0", sha256="410b39950367857f97b65093681fe2495a2e23d63777a8aceaf96c56a16d166e") version("1.12.0", sha256="13b3e77d27523b9dbf4f30dfc9c959455859d5e34e921c44f712d69b8369eff9") version("1.11.0", sha256="eca224c7c2c8ee4072a0743e4898a84a9bdf8297b5e5910a2632e4c4182ffb2a") version("1.10.1", sha256="9d941ba76cab55db8913ecad9dc50cefeb368460f6338a91783a5d7643f3a044") @@ -40,8 +42,10 @@ class PyOnnx(PythonPackage): depends_on("py-protobuf@:3", type=("build", "run"), when="@1.10.1") depends_on("protobuf@3.12.2:", when="@1.11.0") depends_on("py-protobuf@3.12.2:", type=("build", "run"), when="@1.11.0") - depends_on("protobuf@3.12.2:3.20.1", when="@1.12.0:") - depends_on("py-protobuf@3.12.2:3.20.1", type=("build", "run"), when="@1.12.0:") + depends_on("protobuf@3.12.2:3.20.1", when="@1.12.0") + depends_on("py-protobuf@3.12.2:3.20.1", type=("build", "run"), when="@1.12.0") + depends_on("protobuf@3.20.2:3", when="@1.13.0:") + depends_on("py-protobuf@3.20.2:3", type=("build", "run"), when="@1.13.0:") depends_on("py-numpy", type=("build", "run")) depends_on("py-numpy@1.16.6:", type=("build", "run"), when="@1.8.1:") depends_on("py-six", type=("build", "run"), when="@:1.8.1") diff --git a/var/spack/repos/builtin/packages/py-protobuf/package.py b/var/spack/repos/builtin/packages/py-protobuf/package.py index 59f9e44cfc..8141a606b7 100644 --- a/var/spack/repos/builtin/packages/py-protobuf/package.py +++ b/var/spack/repos/builtin/packages/py-protobuf/package.py @@ -24,6 +24,8 @@ class PyProtobuf(PythonPackage): version("4.21.9", sha256="61f21493d96d2a77f9ca84fefa105872550ab5ef71d21c458eb80edcf4885a99") version("4.21.7", sha256="71d9dba03ed3432c878a801e2ea51e034b0ea01cf3a4344fb60166cb5f6c8757") version("4.21.5", sha256="eb1106e87e095628e96884a877a51cdb90087106ee693925ec0a300468a9be3a") + version("3.20.3", sha256="2e3427429c9cffebf259491be0af70189607f365c2f41c7c3764af6f337105f2") + version("3.20.2", sha256="712dca319eee507a1e7df3591e639a2b112a2f4a62d40fe7832a16fd19151750") version("3.20.1", sha256="adc31566d027f45efe3f44eeb5b1f329da43891634d61c75a5944e9be6dd42c9") version("3.20.0", sha256="71b2c3d1cd26ed1ec7c8196834143258b2ad7f444efff26fdc366c6f5e752702") version("3.19.4", sha256="9df0c10adf3e83015ced42a9a7bd64e13d06c4cf45c340d2c63020ea04499d0a")