...
 
Commits (6)
    https://gitcode.net/weixin_42428077/tensorflow/-/commit/f80a64ddb86c7ae7bfd3e360515dc7a348e1a48c Use LLD-16 as the linker when building. 2023-08-28T16:42:27+00:00 Brian Wieder bwieder@google.com PiperOrigin-RevId: 533541073 https://gitcode.net/weixin_42428077/tensorflow/-/commit/71f33cc2ae56a202e244d17c3be35c3e0e124542 Add lld-16 to the build docker image. 2023-08-28T16:47:48+00:00 Brian Wieder bwieder@google.com PiperOrigin-RevId: 531301837 https://gitcode.net/weixin_42428077/tensorflow/-/commit/6375191a081d2ef56c946272dc16ea6bfbbccda0 Merge pull request #61722 from tensorflow/r2.13-bf4a9d00b2a 2023-08-28T12:55:03-07:00 learning-to-play 66660475+learning-to-play@users.noreply.github.com r2.13 cherry-pick: <a href="/weixin_42428077/tensorflow/-/commit/bf4a9d00b2a48f7ecb38d0092d20b9daba7ea7dd" data-original="bf4a9d00b2a" data-link="false" data-link-reference="false" data-project="66160" data-commit="bf4a9d00b2a48f7ecb38d0092d20b9daba7ea7dd" data-reference-type="commit" data-container="body" data-placement="top" title="Add lld-16 to the build docker image." class="gfm gfm-commit has-tooltip">bf4a9d00</a> "Add lld-16 to the build docker image." https://gitcode.net/weixin_42428077/tensorflow/-/commit/1d55ad5d840f448869d3e88c95e18702dbf8b5dd Upgrade patchelf to v0.18.0 to fix certain TF shared libaries having corrupte... 2023-08-28T19:55:06+00:00 Nitin Srinivasan srnitin@google.com Upgrade patchelf to v0.18.0 to fix certain TF shared libaries having corrupted PT_NOTE program headers. It seems that using Patchelf &lt;0.12 during the [wheel building process](<a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/pip_package/build_pip_package.sh#L255-L262" rel="nofollow noreferrer noopener" target="_blank">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/pip_package/build_pip_package.sh#L255-L262</a>) corrupts the PT_NOTE program headers of certain shared libraries. Upgrading the patchelf version seems to fix this. We need to download the latest version from GitHub because the default Ubuntu Focal packages only provide the "0.10-2build1" version. PiperOrigin-RevId: 560754278 https://gitcode.net/weixin_42428077/tensorflow/-/commit/2cb8ee372550c3828d76dd3406d5d614bd96ad7c Merge pull request #61721 from tensorflow/r2.13-722817e2a28 2023-08-28T12:55:20-07:00 learning-to-play 66660475+learning-to-play@users.noreply.github.com r2.13 cherry-pick: <a href="/weixin_42428077/tensorflow/-/commit/722817e2a2860d9747b169715b645fa235edfb93" data-original="722817e2a28" data-link="false" data-link-reference="false" data-project="66160" data-commit="722817e2a2860d9747b169715b645fa235edfb93" data-reference-type="commit" data-container="body" data-placement="top" title="Use LLD-16 as the linker when building." class="gfm gfm-commit has-tooltip">722817e2</a> "Use LLD-16 as the linker when building." https://gitcode.net/weixin_42428077/tensorflow/-/commit/8543b7b049f3fa31d971d3e458556a7f362116d8 Merge pull request #61729 from tensorflow/r2.13-d14bacc5503 2023-08-28T14:00:03-07:00 learning-to-play 66660475+learning-to-play@users.noreply.github.com r2.13 cherry-pick: <a href="/weixin_42428077/tensorflow/-/commit/d14bacc55032ecc49054f39d60a2e8ac20175e23" data-original="d14bacc5503" data-link="false" data-link-reference="false" data-project="66160" data-commit="d14bacc55032ecc49054f39d60a2e8ac20175e23" data-reference-type="commit" data-container="body" data-placement="top" title="Upgrade patchelf to v0.18.0 to fix certain TF shared libaries having corrupted..." class="gfm gfm-commit has-tooltip">d14bacc5</a> "Upgrade patchelf to v0.18.0 to fix certain TF shared libaries having corrupted PT_NOTE program headers."
......@@ -34,12 +34,18 @@ RUN /setup.sources.sh && /setup.packages.sh /devel.packages.txt && /setup.cuda.s
# - buildifier: clean bazel build deps
# - buildozer: clean bazel build deps
# - gcloud SDK: communicate with Google Cloud Platform (GCP) for RBE, CI
# - patchelf: Utility tool to modify existing ELF executables and libraries
RUN git clone --branch v1.7.0 https://github.com/bats-core/bats-core.git && bats-core/install.sh /usr/local && rm -rf bats-core
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64 -O /usr/local/bin/bazel && chmod +x /usr/local/bin/bazel
RUN wget https://github.com/bazelbuild/buildtools/releases/download/3.5.0/buildifier -O /usr/local/bin/buildifier && chmod +x /usr/local/bin/buildifier
RUN wget https://github.com/bazelbuild/buildtools/releases/download/3.5.0/buildozer -O /usr/local/bin/buildozer && chmod +x /usr/local/bin/buildozer
RUN curl -sSL https://sdk.cloud.google.com > /tmp/gcloud && bash /tmp/gcloud --install-dir=~/usr/local/bin --disable-prompts
# Download and install patchelf v0.18.0 from GitHub. The default Ubuntu focal
# packages only provide the "0.10-2build1" version. We use patchelf to manipulate
# certain shared libraries during the wheel building process (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/pip_package/build_pip_package.sh#L255-L262).
# When we use Patchelf versions <0.12, those shared libraries end up with a
# corrupted PT_NOTE program header. This was fixed in v0.12, see https://github.com/NixOS/patchelf/commit/43a33482b501b0f5ee9da312aabfca3806570cc9.
RUN wget https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-x86_64.tar.gz && tar -zxvf patchelf-0.18.0-x86_64.tar.gz -C /usr && rm -rf patchelf-0.18.0-x86_64.tar.gz
# All lines past this point are reset when $CACHEBUSTER is set. We need this
# for Python specifically because we install some nightly packages which are
......
......@@ -28,6 +28,7 @@ build-essential
ca-certificates
llvm-16
clang-16
lld-16
clang-format-12
colordiff
curl
......@@ -47,7 +48,6 @@ mlocate
moreutils
openjdk-11-jdk
openjdk-11-jre-headless
patchelf
pkg-config
python3-dev
python3-setuptools
......
......@@ -23,6 +23,10 @@ build --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
# Target the AVX instruction set
build --copt=-mavx --host_copt=-mavx
# Use lld as the linker
build --linkopt="-fuse-ld=lld"
build --linkopt="-lm"
# Disable clang extention that rejects type definitions within offsetof.
# This was added in clang-16 by https://reviews.llvm.org/D133574.
# Can be removed once upb is updated, since a type definition is used within
......
......@@ -30,6 +30,10 @@ build --copt=-mavx --host_copt=-mavx
# See https://github.com/protocolbuffers/upb/blob/9effcbcb27f0a665f9f345030188c0b291e32482/upb/upb.c#L183.
build --copt=-Wno-gnu-offsetof-extensions
# Use lld as the linker
build --linkopt="-fuse-ld=lld"
build --linkopt="-lm"
# Store performance profiling log in the mounted artifact directory.
# The profile can be viewed by visiting chrome://tracing in a Chrome browser.
# See https://docs.bazel.build/versions/main/skylark/performance.html#performance-profiling
......