Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TF to 2.12 (backport from IB/CMSSW_13_2_X/g13 branch) #8565

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion abseil-cpp.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external abseil-cpp 20210324.2
### RPM external abseil-cpp 20230125.3
Source: https://github.com/abseil/abseil-cpp/archive/%{realversion}.tar.gz

BuildRequires: cmake gmake
Expand Down
12 changes: 6 additions & 6 deletions bazel-3.7.0-patches.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkActionFactoryApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkActionFactoryApi.java
index 0ea30a9..8df189f 100755
index 9f7fe1f..e584fb9 100755
--- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkActionFactoryApi.java
+++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkActionFactoryApi.java
@@ -359,7 +359,7 @@ public interface StarlarkActionFactoryApi extends StarlarkValue {
@@ -377,7 +377,7 @@ public interface StarlarkActionFactoryApi extends StarlarkValue {
+ " the former are more efficient."),
@Param(
name = "use_default_shell_env",
type = Boolean.class,
- defaultValue = "False",
+ defaultValue = "True",
named = true,
positional = false,
doc = "Whether the action should use the built in shell environment or not."),
diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl
index d48485b..40ca051 100755
index bfb37bd..45e311c 100755
--- a/tools/cpp/unix_cc_configure.bzl
+++ b/tools/cpp/unix_cc_configure.bzl
@@ -193,6 +193,7 @@ def _find_gold_linker_path(repository_ctx, cc):
@@ -184,6 +184,7 @@ def _find_linker_path(repository_ctx, cc, linker, is_clang):
Returns:
String to put as value to -fuse-ld= flag, or None if gold couldn't be found.
String to put as value to -fuse-ld= flag, or None if linker couldn't be found.
"""
+ return None
result = repository_ctx.execute([
Expand Down
25 changes: 25 additions & 0 deletions bazel-absl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- bazel/distdir_deps.bzl.orig 2023-06-12 11:36:07.650810578 +0200
+++ bazel/distdir_deps.bzl 2023-06-12 11:37:10.490300045 +0200
@@ -162,17 +162,17 @@
],
},
"com_google_absl": {
- "archive": "20211102.0.tar.gz",
- "sha256": "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4",
+ "archive": "20230125.3.tar.gz",
+ "sha256": "5366d7e7fa7ba0d915014d387b66d0d002c03236448e1ba9ef98122c13b35c36",
"urls": [
- "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz",
- "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz",
+ "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20230125.3.tar.gz",
+ "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230125.3.tar.gz",
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
- "strip_prefix": "abseil-cpp-20211102.0",
+ "strip_prefix": "abseil-cpp-20230125.3",
},
"zstd-jni": {
"archive": "v1.5.0-4.zip",
5 changes: 3 additions & 2 deletions bazel.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external bazel 3.7.2
### RPM external bazel 5.3.0

Source: https://github.com/bazelbuild/bazel/releases/download/%{realversion}/bazel-%{realversion}-dist.zip

Expand All @@ -17,7 +17,7 @@ BuildRequires: java-env python3 python-python3
# configuration issue
# https://github.com/bazelbuild/bazel/issues/9392
Patch0: bazel-3.7.0-patches
Patch1: bazel-3.7.2-gcc11
Patch1: bazel-absl

%prep
%setup -q -c -n bazel-%{realversion}
Expand All @@ -28,6 +28,7 @@ Patch1: bazel-3.7.2-gcc11
%build

export EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk --jobs %{compiling_processes}"
export BAZEL_CXXOPTS="-std=c++17"
bash ./compile.sh

%install
Expand Down
6 changes: 3 additions & 3 deletions eigen.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### RPM external eigen 82dd3710dac619448f50331c1d6a35da673f764a
### RPM external eigen 3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e
## INITENV +PATH PKG_CONFIG_PATH %{i}/share/pkgconfig
## NOCOMPILER
%define tag 43d8892d117e4e76b6c472b942ebefee00bfc172
%define tag fe7e6a8ef4921dd6c7b5b893a9972948f1b451d3
%define branch cms/master/%{realversion}
%define github_user cms-externals
Source: git+https://github.com/%{github_user}/eigen-git-mirror.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz
Expand All @@ -13,7 +13,7 @@ BuildRequires: cmake
%build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{i} -DBUILD_TESTING=OFF ../
cmake -DCMAKE_INSTALL_PREFIX=%{i} -DBUILD_TESTING=OFF -DCMAKE_CXX_STANDARD=17 ../

%install
cd build
Expand Down
16 changes: 9 additions & 7 deletions fasthadd.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
### RPM external fasthadd 2.3
### RPM external fasthadd 2.4

#Change the commit hash every time a new version is needed.
%define commit 905af02d3369428df677c232537da6fca8982ff3
Source0: https://raw.githubusercontent.com/cms-sw/cmssw/%commit/DQMServices/Components/bin/fastHadd.cc
Source1: https://raw.githubusercontent.com/cms-sw/cmssw/%commit/DQMServices/Core/src/ROOTFilePB.proto
Requires: protobuf root
%define commit 003102d8516b652d80e76d8ca1c4b5dc47c9015b
%define user iarspider
iarspider marked this conversation as resolved.
Show resolved Hide resolved
Source0: https://raw.githubusercontent.com/%user/cmssw/%commit/DQMServices/Components/bin/fastHadd.cc
Source1: https://raw.githubusercontent.com/%user/cmssw/%commit/DQMServices/Core/src/ROOTFilePB.proto
Requires: protobuf root abseil-cpp

%prep

Expand All @@ -14,9 +15,10 @@ mkdir -p %i/bin %i/etc/profile.d
cp %{_sourcedir}/fastHadd.cc .
cp %{_sourcedir}/ROOTFilePB.proto .
protoc -I ./ --cpp_out=./ ROOTFilePB.proto
perl -p -i -e 's|DQMServices/Core/src/||' ROOTFilePB.pb.cc fastHadd.cc
perl -p -i -e 's|DQMServices/Core/interface/||' ROOTFilePB.pb.cc fastHadd.cc
g++ -O2 -o %i/bin/fastHadd ROOTFilePB.pb.cc ./fastHadd.cc \
-I$PROTOBUF_ROOT/include -L$PROTOBUF_ROOT/lib -lprotobuf \
-I$PROTOBUF_ROOT/include -L$PROTOBUF_ROOT/lib -lprotobuf -L$ABSEIL_CPP_ROOT/lib -labsl_log_internal_check_op \
-labsl_log_internal_message \
`root-config --cflags --libs`

%install
11 changes: 11 additions & 0 deletions flatbuffers-7422.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- flatbuffers/CMakeLists.txt.orig 2023-05-30 14:34:01.518107275 +0200
+++ flatbuffers/CMakeLists.txt 2023-05-30 14:35:11.112747553 +0200
@@ -223,7 +223,7 @@
"${CMAKE_CXX_FLAGS} -std=c++0x")
endif(CYGWIN)
set(CMAKE_CXX_FLAGS
- "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow")
+ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wno-unknown-warning-option -Werror -Wextra -Werror=shadow -Wno-error=stringop-overflow")
set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
7 changes: 6 additions & 1 deletion flatbuffers.spec
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
### RPM external flatbuffers 1.12.0
### RPM external flatbuffers 2.0.6
## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64

%define tag v%{realversion}
%define branch master
%define github_user google
Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz
Patch0: flatbuffers-7422

BuildRequires: cmake gmake

%prep
%setup -n %{n}-%{realversion}
%patch0 -p1

%build
rm -rf ../build
Expand All @@ -29,3 +31,6 @@ make -v %{makeprocesses}
cd ../build

make %{makeprocesses} install

%post
%{relocateConfig}lib64/pkgconfig/flatbuffers.pc
3 changes: 2 additions & 1 deletion gbl.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ cmake ../cpp \
-DCMAKE_INSTALL_PREFIX=%{i} \
-DCMAKE_BUILD_TYPE=Release \
-DEIGEN3_INCLUDE_DIR=${EIGEN_ROOT}/include/eigen3 \
-DSUPPORT_ROOT=False
-DSUPPORT_ROOT=False \
-DCMAKE_CXX_STANDARD=17

make %{makeprocesses}

Expand Down
37 changes: 0 additions & 37 deletions grpc-gcc11.patch

This file was deleted.

2 changes: 0 additions & 2 deletions grpc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

Source: git+https://github.com/grpc/grpc.git?obj=master/v%{realversion}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz
Patch0: grpc-ssl-fix
Patch1: grpc-gcc11
BuildRequires: cmake ninja go
Requires: protobuf zlib pcre c-ares abseil-cpp re2
%define keep_archives true
Expand All @@ -13,7 +12,6 @@ Requires: protobuf zlib pcre c-ares abseil-cpp re2
if [ ! -z "$OPENSSL_ROOT" ]; then
%patch0 -p1
fi
%patch1 -p1

%build
rm -rf ../build
Expand Down
5 changes: 5 additions & 0 deletions java-env.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
## INITENV +PATH LD_LIBRARY_PATH %{java_home}/lib
## NOCOMPILER

%if %{rhel} < 9
# /usr/lib/jvm/java on EL8 contains java 1.8, and Bazel requires java 11
%define java_home /usr/lib/jvm/java-11
%else
%define java_home /usr/lib/jvm/java
%endif
Source: none

%prep
Expand Down
10 changes: 7 additions & 3 deletions libzmq.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
### RPM external libzmq 4.3.4
Source: https://github.com/zeromq/libzmq/releases/download/v%{realversion}/zeromq-%{realversion}.tar.gz
### RPM external libzmq 4.3.5-5bf04ee
%define branch master
%define tag 5bf04ee2ff207f0eaf34298658fe354ea61e1839
Source: git+https://github.com/zeromq/libzmq.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz
BuildRequires: autotools

%prep
%setup -n zeromq-%{realversion}
%setup -n %{n}-%{realversion}

./autogen.sh

./configure --prefix=%{i} \
--without-docs \
Expand Down
3 changes: 2 additions & 1 deletion lwtnn.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ cmake ../%{n}-%{realversion} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILTIN_BOOST=OFF \
-DBUILTIN_EIGEN=OFF \
-DCMAKE_PREFIX_PATH="${EIGEN_ROOT};${BOOST_ROOT}"
-DCMAKE_PREFIX_PATH="${EIGEN_ROOT};${BOOST_ROOT}" \
-DCMAKE_CXX_STANDARD=17

ninja -v %{makeprocesses}

Expand Down
7 changes: 6 additions & 1 deletion onnxruntime.spec
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,17 @@ cmake ../%{n}-%{realversion}/cmake -GNinja \
-Donnxruntime_USE_FULL_PROTOBUF=ON \
-Donnxruntime_DISABLE_CONTRIB_OPS=OFF \
-Donnxruntime_PREFER_SYSTEM_LIB=ON \
-Donnxruntime_BUILD_UNIT_TESTS=OFF \
-DCMAKE_CUDA_ARCHITECTURES=$(echo %{cuda_arch} | tr ' ' ';' | sed 's|;;*|;|') \
-DCMAKE_CUDA_FLAGS="-cudart shared" \
-DCMAKE_CUDA_RUNTIME_LIBRARY=Shared \
-DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES="CMAKE_CUDA_RUNTIME_LIBRARY" \
-DCMAKE_PREFIX_PATH="${ZLIB_ROOT};${LIBPNG_ROOT};${PROTOBUF_ROOT};${PY3_PYBIND11_ROOT};${RE2_ROOT}" \
-DRE2_INCLUDE_DIR="${RE2_ROOT}/include"
-DRE2_INCLUDE_DIR="${RE2_ROOT}/include" \
-DCMAKE_CXX_FLAGS="-Wno-error=stringop-overflow"

# False positive string overflow
# https://github.com/google/flatbuffers/issues/7366

ninja -v %{makeprocesses}
python3 ../%{n}-%{realversion}/setup.py build
Expand Down
1 change: 1 addition & 0 deletions opencv.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cd ../build
cmake ../%{n}-%{realversion} \
-GNinja \
-DCMAKE_INSTALL_PREFIX="%{i}" \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_EIGEN=ON \
-DBUILD_EXAMPLES=OFF \
Expand Down
1 change: 1 addition & 0 deletions pip/jax.file
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Requires: py3-ml_dtypes py3-numpy py3-opt-einsum py3-scipy py3-importlib-metadata
1 change: 1 addition & 0 deletions pip/ml_dtypes.file
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Requires: py3-pybind11 py3-numpy
3 changes: 2 additions & 1 deletion pip/onnx.file
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Patch0: py3-onnx
Requires: cmake protobuf py3-protobuf py3-six py3-typing-extensions py3-numpy py3-pytest-runner
%define runpath_opts -n pb -n onnx
%define PipPreBuild export ONNX_ML=1
%define PipPreBuild export ONNX_ML=1;export CMAKE_ARGS="-DCMAKE_CXX_STANDARD=17 -DONNX_USE_PROTOBUF_SHARED_LIBS=ON -DProtobuf_USE_STATIC_LIBS=OFF -DCMAKE_PREFIX_PATH=%{cmake_prefix_path}"
19 changes: 11 additions & 8 deletions pip/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ contextvars==2.4
coverage==7.2.2
cppy==1.2.1
# Newer versions of py3-cryptography require OpenSSL 1.1.0+, see https://github.com/pyca/cryptography/issues/5906
cryptography==40.0.2
cryptography==41.0.1
cryptography==3.2.1 ; cmsos_name=='slc7'
cx-Oracle==8.3.0
cycler==0.11.0
cython==0.29.34
cython==0.29.35
dask==2023.4.0
dask-awkward==2023.4.1
decorator==5.1.1
Expand Down Expand Up @@ -147,6 +147,7 @@ ipython==8.12.0
ipywidgets==8.0.6
isort==5.12.0
jaraco-classes==3.2.3
jax==0.4.12
jedi==0.18.2
jeepney==0.8.0
Jinja2==3.1.2
Expand All @@ -165,7 +166,7 @@ jupyter-server-mathjax==0.2.6
jupyter-server-terminals==0.4.4
jupyterlab-widgets==3.0.7
#NO_AUTO_UPDATE: needs newer TF
keras==2.6.0
keras==2.11.0
keras-applications==1.0.8
keras-preprocessing==1.1.2
keras2onnx==1.7.0
Expand All @@ -192,6 +193,7 @@ mdurl==0.1.2
meson==1.1.0
meson-python==0.12.1
mistune==2.0.5
ml_dtypes==0.2.0
mock==5.0.1
more-itertools==9.1.0
mpld3==0.5.9
Expand All @@ -216,16 +218,16 @@ notebook-shim==0.2.2
numexpr==2.8.4
# setuptools version <64 is needed by numpy: https://github.com/pypa/setuptools/issues/3549
# NO_AUTO_UPDATE: update together with tensorflow
numpy==1.23.5
numpy==1.24.3
# NO_AUTO_UPDATE:1
onnx==1.12.0
onnx==1.14.0
onnxmltools==1.11.2
onnxconverter-common==1.13.0
oauthlib==3.2.2
opt-einsum==3.3.0
pkginfo==1.9.6
packaging==23.0
pandas==2.0.0
pandas==2.0.1
pandocfilters==1.5.0
parsimonious==0.10.0
parso==0.8.3
Expand All @@ -251,7 +253,7 @@ prettytable==3.6.0
prometheus-client==0.16.0
prompt_toolkit==3.0.38
#NO_AUTO_UPDATE:1: Update together with Tensorflow
protobuf==4.21.7
protobuf==4.21.9
prwlock==0.4.1
psutil==5.9.4
ptyprocess==0.7.0
Expand Down Expand Up @@ -340,8 +342,9 @@ sympy==1.11.1
tables==3.8.0
tenacity==8.2.2
#NO_AUTO_UPDATE:1: Force to use tensorflow 2.6.4; this should match the version in tensorflow-sources.spec
tensorflow==2.6.4
tensorflow==2.12.0
tensorboard==2.12.1
tensorflow-io-gcs-filesystem==0.32.0
tensorflow-estimator==2.12.0
tensorboard-data-server==0.7.0
tensorboard-plugin-wit==1.8.1
Expand Down
2 changes: 2 additions & 0 deletions pip/tensorflow-io-gcs-filesystem.file
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%define source0 git+https://github.com/tensorflow/io?obj=master/v%{realversion}&export=%{n}-%{realversion}&output=/source.tar.gz
Patch0: py3-tensorflow-io-gcs-filesystem
Loading