Skip to content

Commit b83579d

Browse files
authored
Merge pull request #3087 from ROCm/develop-upstream-sync-250825
Develop upstream sync 250825
2 parents c02ff4c + ca9684e commit b83579d

File tree

3,263 files changed

+543635
-61921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,263 files changed

+543635
-61921
lines changed

.bazelrc

Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@
7676
# The generated version suffix is used in
7777
# third_party/tensorflow/core/public/release_version.h and
7878
# third_party/tensorflow/tools/pip_package/setup.oss.py.tpl
79-
build --repo_env=ML_WHEEL_TYPE="nightly"
80-
build --repo_env=ML_WHEEL_BUILD_DATE="20250716"
81-
build --repo_env=ML_WHEEL_VERSION_SUFFIX=".630"
79+
build --repo_env=ML_WHEEL_TYPE="snapshot"
80+
build --repo_env=ML_WHEEL_BUILD_DATE=""
81+
build --repo_env=ML_WHEEL_VERSION_SUFFIX=""
8282

8383
# For projects which use TensorFlow as part of a Bazel build process, putting
8484
# nothing in a bazelrc will default to a monolithic build. The following line
@@ -163,9 +163,13 @@ common --incompatible_enforce_config_setting_visibility
163163
# TODO: Enable Bzlmod
164164
common --noenable_bzlmod
165165

166+
build --incompatible_enable_cc_toolchain_resolution
167+
build --repo_env USE_HERMETIC_CC_TOOLCHAIN=1
168+
166169
# TODO: Migrate for https://github.com/bazelbuild/bazel/issues/7260
167-
common --noincompatible_enable_cc_toolchain_resolution
168-
common --noincompatible_enable_android_toolchain_resolution
170+
build:clang_local --noincompatible_enable_cc_toolchain_resolution
171+
build:clang_local --noincompatible_enable_android_toolchain_resolution
172+
build:clang_local --repo_env USE_HERMETIC_CC_TOOLCHAIN=0
169173

170174
# Print a stacktrace when a test is killed
171175
test --test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1"
@@ -176,6 +180,7 @@ test --test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1"
176180
# Android configs. Bazel needs to have --cpu and --fat_apk_cpu both set to the
177181
# target CPU to build transient dependencies correctly. See
178182
# https://docs.bazel.build/versions/master/user-manual.html#flag--fat_apk_cpu
183+
build:android --config=clang_local
179184
build:android --crosstool_top=//external:android/crosstool
180185
build:android --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
181186
build:android_arm --config=android
@@ -214,7 +219,8 @@ build:macos --features=archive_param_file
214219
build:macos --linkopt=-Wl,-undefined,dynamic_lookup
215220
build:macos --host_linkopt=-Wl,-undefined,dynamic_lookup
216221

217-
# Use the Apple toolchain for MacOS builds.
222+
# Use the old Apple toolchain for MacOS builds.
223+
build:macos --config=clang_local
218224
build:macos --config=apple-toolchain
219225

220226
# Use cc toolchains from apple_support for Apple builds (ios, macos, etc).
@@ -226,12 +232,14 @@ build:apple-toolchain --host_crosstool_top=@local_config_apple_cc//:toolchain
226232
# Settings for MacOS on ARM CPUs.
227233
build:macos_arm64 --cpu=darwin_arm64
228234
build:macos_arm64 --macos_minimum_os=11.0
235+
build:macos_arm64 --config=clang_local
229236
build:macos_arm64 --platforms=@build_bazel_apple_support//configs/platforms:darwin_arm64
230237

231238
# iOS configs for each architecture and the fat binary builds.
232239
build:ios --apple_platform_type=ios
233240
build:ios --copt=-fembed-bitcode
234241
build:ios --copt=-Wno-c++11-narrowing
242+
build:ios --config=clang_local
235243
build:ios --config=apple-toolchain
236244
build:ios_armv7 --config=ios
237245
build:ios_armv7 --cpu=ios_armv7
@@ -273,16 +281,12 @@ build:mkl_threadpool --define=tensorflow_mkldnn_contraction_kernel=0
273281
build:mkl_threadpool --define=build_with_mkl_opensource=true
274282
build:mkl_threadpool -c opt
275283

276-
# Config setting to build oneDNN with Compute Library for the Arm Architecture (ACL).
277-
build:mkl_aarch64 --define=build_with_mkl_aarch64=true
278-
build:mkl_aarch64 --define=build_with_openmp=true
279-
build:mkl_aarch64 --define=build_with_acl=true
280-
build:mkl_aarch64 -c opt
281-
282284
# Config setting to build oneDNN with Compute Library for the Arm Architecture (ACL).
283285
# with Eigen threadpool support
284286
build:mkl_aarch64_threadpool --define=build_with_mkl_aarch64=true
285287
build:mkl_aarch64_threadpool -c opt
288+
# This is an alias for the mkl_aarch64_threadpool build.
289+
build:mkl_aarch64 --config=mkl_aarch64_threadpool
286290

287291
# Default CUDA, CUDNN and NVSHMEM versions.
288292
build:cuda_version --repo_env=HERMETIC_CUDA_VERSION="12.5.1"
@@ -299,7 +303,6 @@ build:cuda --@local_config_cuda//cuda:include_cuda_libs=true
299303

300304
# This configuration is used for building the wheels.
301305
build:cuda_wheel --@local_config_cuda//cuda:include_cuda_libs=false
302-
build:cuda_wheel --@local_config_nvshmem//:include_nvshmem_libs=false
303306

304307
# CUDA: This config refers to building CUDA op kernels with clang.
305308
build:cuda_clang --config=cuda
@@ -358,6 +361,7 @@ build:tpu --define=framework_shared_object=true
358361
build:tpu --copt=-DLIBTPU_ON_GCE
359362
build:tpu --define=enable_mlir_bridge=true
360363

364+
build:rocm --config=clang_local
361365
build:rocm_base --crosstool_top=@local_config_rocm//crosstool:toolchain
362366
build:rocm_base --define=using_rocm_hipcc=true
363367
build:rocm_base --define=tensorflow_mkldnn_contraction_kernel=0
@@ -398,6 +402,7 @@ build:rocm_ci_hermetic --repo_env="OS=ubuntu_22.04"
398402
build:rocm_ci_hermetic --repo_env="ROCM_VERSION=6.2.0"
399403
build:rocm_ci_hermetic --@local_config_rocm//rocm:use_rocm_hermetic_rpath=True
400404

405+
build:sycl --config=clang_local
401406
build:sycl --crosstool_top=@local_config_sycl//crosstool:toolchain
402407
build:sycl --define=using_sycl=true
403408
build:sycl --define=tensorflow_mkldnn_contraction_kernel=0
@@ -537,6 +542,9 @@ build:windows --verbose_failures
537542
# See: https://github.com/bazelbuild/bazel/issues/5163
538543
build:windows --features=compiler_param_file
539544

545+
# Use old toolchains for Windows builds.
546+
build:windows --config=clang_local
547+
540548
# Do not risk cache corruption. See:
541549
# https://github.com/bazelbuild/bazel/issues/3360
542550
build:linux --experimental_guard_against_concurrent_changes
@@ -550,7 +558,9 @@ build:verbose_logs --output_filter=
550558
# avoid having to define linux/win separately.
551559
build:avx_linux --copt=-mavx
552560
build:avx_linux --host_copt=-mavx
561+
build:avx_linux --copt="-mf16c"
553562
build:avx_win --copt=/arch:AVX
563+
build:avx_win --copt="-mf16c"
554564

555565
build:win_clang_base --@com_google_protobuf//build_defs:use_dlls=True
556566
build:win_clang_base --@com_google_absl//absl:use_dlls=True
@@ -567,6 +577,7 @@ test:win_clang_base --host_linkopt=/FORCE:MULTIPLE
567577
test:win_clang_base --build_tests_only --keep_going --test_output=errors --verbose_failures=true --test_summary=short
568578

569579
build:win_clang --config=win_clang_base
580+
build:win_clang --config=clang_local
570581
build:win_clang --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
571582
build:win_clang --extra_execution_platforms=//tensorflow/tools/toolchains/win:x64_windows-clang-cl
572583
build:win_clang --host_platform=//tensorflow/tools/toolchains/win:x64_windows-clang-cl
@@ -604,7 +615,13 @@ build:resultstore --bes_timeout=600s
604615
# Flag to enable remote config
605616
common --experimental_repo_remote_exec
606617

618+
build:use_tar_archive_files --repo_env=USE_CUDA_TAR_ARCHIVE_FILES=1
619+
build:use_tar_archive_files --repo_env=USE_NVSHMEM_TAR_ARCHIVE_FILES=1
620+
build:use_tar_archive_files --repo_env=USE_LLVM_TAR_ARCHIVE_FILES=1
621+
build:use_tar_archive_files --repo_env=USE_MIRRORED_TAR_ARCHIVE_FILES=1
622+
607623
# Make Bazel not try to probe the host system for a C++ toolchain.
624+
build:rbe_base --config=use_tar_archive_files
608625
build:rbe_base --config=resultstore
609626
build:rbe_base --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
610627
build:rbe_base --define=EXECUTOR=remote
@@ -629,12 +646,6 @@ build:rbe_linux --linkopt=-lm
629646
build:rbe_linux --host_linkopt=-lm
630647

631648
build:rbe_linux_cpu --config=rbe_linux
632-
# Linux cpu and cuda builds share the same toolchain now.
633-
build:rbe_linux_cpu --host_crosstool_top="@local_config_cuda//crosstool:toolchain"
634-
build:rbe_linux_cpu --crosstool_top="@local_config_cuda//crosstool:toolchain"
635-
build:rbe_linux_cpu --extra_toolchains="@local_config_cuda//crosstool:toolchain-linux-x86_64"
636-
build:rbe_linux_cpu --repo_env=CC="/usr/lib/llvm-18/bin/clang"
637-
build:rbe_linux_cpu --repo_env=TF_SYSROOT="/dt9"
638649
build:rbe_linux_cpu --extra_execution_platforms="@ml_build_config_platform//:platform"
639650
build:rbe_linux_cpu --host_platform="@ml_build_config_platform//:platform"
640651
build:rbe_linux_cpu --platforms="@ml_build_config_platform//:platform"
@@ -656,6 +667,15 @@ common:rbe_linux_cpu --remote_instance_name=projects/tensorflow-testing/instance
656667
# build:rbe_linux_cpu --repo_env USE_CUDA_REDISTRIBUTIONS=1
657668
# build:rbe_linux_cpu --config=cuda_version
658669

670+
# Deprecated RBE config with non-hermetic toolchains.
671+
build:rbe_linux_cpu_clang_local --config=rbe_linux_cpu
672+
build:rbe_linux_cpu_clang_local --config=clang_local
673+
build:rbe_linux_cpu_clang_local --host_crosstool_top="@local_config_cuda//crosstool:toolchain"
674+
build:rbe_linux_cpu_clang_local --crosstool_top="@local_config_cuda//crosstool:toolchain"
675+
build:rbe_linux_cpu_clang_local --extra_toolchains="@local_config_cuda//crosstool:toolchain-linux-x86_64"
676+
build:rbe_linux_cpu_clang_local --repo_env=CC="/usr/lib/llvm-18/bin/clang"
677+
build:rbe_linux_cpu_clang_local --repo_env=TF_SYSROOT="/dt9"
678+
659679
# TODO(kanglan): Remove it after toolchain update is complete.
660680
build:rbe_linux_cpu_old --config=rbe_linux
661681
build:rbe_linux_cpu_old --host_crosstool_top="@ubuntu20.04-gcc9_manylinux2014-cuda11.2-cudnn8.1-tensorrt7.2_config_cuda//crosstool:toolchain"
@@ -669,8 +689,6 @@ common:rbe_linux_cpu_old --remote_instance_name=projects/tensorflow-testing/inst
669689

670690
build:rbe_linux_cuda --config=cuda_clang_official
671691
build:rbe_linux_cuda --config=rbe_linux_cpu
672-
build:rbe_linux_cuda --repo_env=USE_CUDA_TAR_ARCHIVE_FILES=1
673-
build:rbe_linux_cuda --repo_env=USE_NVSHMEM_TAR_ARCHIVE_FILES=1
674692
# For Remote build execution -- GPU configuration
675693
build:rbe_linux_cuda --repo_env=REMOTE_GPU_TESTING=1
676694

@@ -692,6 +710,7 @@ build:rbe_linux_cuda_nvcc --config=cuda_nvcc
692710
build:rbe_linux_cuda_nvcc --repo_env TF_NCCL_USE_STUB=1
693711

694712
build:rbe_win_base --config=rbe_base
713+
build:rbe_win_base --config=clang_local
695714
build:rbe_win_base --shell_executable=C:\\tools\\msys64\\usr\\bin\\bash.exe
696715
build:rbe_win_base --remote_instance_name=projects/tensorflow-testing/instances/windows
697716
# Don't build the python zip archive in the RBE build.
@@ -707,6 +726,7 @@ build:rbe_windows_x86_cpu_2022 --config=rbe_win_base --config=windows_x86_cpu_20
707726
# END TF REMOTE BUILD EXECUTION OPTIONS
708727

709728
# TFLite build configs for generic embedded Linux
729+
build:elinux --config=clang_local
710730
build:elinux --crosstool_top=@local_config_embedded_arm//:toolchain
711731
build:elinux --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
712732
build:elinux_aarch64 --config=elinux
@@ -781,8 +801,23 @@ build:release_gpu_linux --config=cuda_clang_official
781801
# Local test jobs has to be 4 because parallel_gpu_execute is fragile, I think
782802
test:release_gpu_linux --test_timeout=300,450,1200,3600 --local_test_jobs=4 --run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute
783803

804+
# Deprecated release CPU config with non-hermetic toolchains.
805+
build:release_cpu_linux_clang_local --config=release_cpu_linux
806+
build:release_cpu_linux_clang_local --config=clang_local
807+
build:release_cpu_linux_clang_local --repo_env=CC="/usr/lib/llvm-18/bin/clang"
808+
build:release_cpu_linux_clang_local --repo_env=BAZEL_COMPILER="/usr/lib/llvm-18/bin/clang"
809+
build:release_cpu_linux_clang_local --crosstool_top="@local_config_cuda//crosstool:toolchain"
810+
build:release_cpu_linux_clang_local --repo_env=TF_SYSROOT="/dt9"
811+
812+
# Deprecated release GPU config with non-hermetic toolchains.
813+
build:release_gpu_linux_clang_local --config=release_gpu_linux
814+
build:release_gpu_linux_clang_local --config=release_cpu_linux_clang_local
815+
784816
build:release_arm64_linux --config=release_linux_base
785817
build:release_arm64_linux --config=linux_arm64
818+
build:release_arm64_linux --config=clang_local
819+
build:release_arm64_linux --repo_env=CC="/usr/lib/llvm-18/bin/clang"
820+
build:release_arm64_linux --repo_env=BAZEL_COMPILER="/usr/lib/llvm-18/bin/clang"
786821
build:release_arm64_linux --crosstool_top="@ml2014_clang_aarch64_config_aarch64//crosstool:toolchain"
787822
build:release_arm64_linux --config=mkl_aarch64_threadpool
788823
build:release_arm64_linux --copt=-flax-vector-conversions
@@ -791,6 +826,7 @@ test:release_arm64_linux --flaky_test_attempts=3
791826
build:release_cpu_macos --config=avx_linux
792827

793828
# Base build configs for macOS
829+
build:release_macos_base --config=clang_local
794830
build:release_macos_base --action_env DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
795831
build:release_macos_base --define=no_nccl_support=true --output_filter=^$
796832

@@ -956,6 +992,7 @@ test:windows_x86_cpu_2022_pycpp_test --config=windows_x86_cpu_2022_pycpp_test_op
956992
# flags seem to be actually used to specify the execution platform details. It
957993
# seems it is this way because these flags are old and predate the distinction
958994
# between host and execution platform.
995+
build:cross_compile_base --config=clang_local
959996
build:cross_compile_base --host_cpu=k8
960997
build:cross_compile_base --host_crosstool_top=//tensorflow/tools/toolchains/cross_compile/cc:cross_compile_toolchain_suite
961998
build:cross_compile_base --extra_execution_platforms=//tensorflow/tools/toolchains/cross_compile/config:linux_x86_64

.github/workflows/osv-scanner-scheduled.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ permissions:
2828
jobs:
2929
scan-scheduled:
3030
if: github.repository == 'tensorflow/tensorflow'
31-
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v2.0.3"
31+
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v2.1.0"
3232
with:
3333
scan-args: |-
3434
--lockfile=requirements.txt:./requirements_lock_3_9.txt

.github/workflows/scorecards-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ jobs:
6464
# Upload the results to GitHub's code scanning dashboard (optional).
6565
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
6666
- name: "Upload to code-scanning"
67-
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
67+
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
6868
with:
6969
sarif_file: results.sarif

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ $ pip install tensorflow
8787
```
8888

8989
Other devices (DirectX and MacOS-metal) are supported using
90-
[Device plugins](https://www.tensorflow.org/install/gpu_plugins#available_devices).
90+
[Device Plugins](https://www.tensorflow.org/install/gpu_plugins#available_devices).
9191

9292
A smaller CPU-only package is also available:
9393

@@ -118,16 +118,16 @@ b'Hello, TensorFlow!'
118118
```
119119

120120
For more examples, see the
121-
[TensorFlow tutorials](https://www.tensorflow.org/tutorials/).
121+
[TensorFlow Tutorials](https://www.tensorflow.org/tutorials/).
122122

123123
## Contribution guidelines
124124

125125
**If you want to contribute to TensorFlow, be sure to review the
126-
[contribution guidelines](CONTRIBUTING.md). This project adheres to TensorFlow's
127-
[code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to
126+
[Contribution Guidelines](CONTRIBUTING.md). This project adheres to TensorFlow's
127+
[Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to
128128
uphold this code.**
129129

130-
**We use [GitHub issues](https://github.com/tensorflow/tensorflow/issues) for
130+
**We use [GitHub Issues](https://github.com/tensorflow/tensorflow/issues) for
131131
tracking requests and bugs, please see
132132
[TensorFlow Forum](https://discuss.tensorflow.org/) for general questions and
133133
discussion, and please direct specific questions to
@@ -141,18 +141,18 @@ open-source software development.
141141
Follow these steps to patch a specific version of TensorFlow, for example, to
142142
apply fixes to bugs or security vulnerabilities:
143143

144-
* Clone the TensorFlow repo and switch to the corresponding branch for your
145-
desired TensorFlow version, for example, branch `r2.8` for version 2.8.
146-
* Apply (that is, cherry-pick) the desired changes and resolve any code
147-
conflicts.
144+
* Clone the TensorFlow repository and switch to the appropriate branch for
145+
your desired versionfor example, `r2.8` for version 2.8.
146+
* Apply the desired changes (i.e., cherry-pick them) and resolve any code
147+
conflicts.
148148
* Run TensorFlow tests and ensure they pass.
149149
* [Build](https://www.tensorflow.org/install/source) the TensorFlow pip
150150
package from source.
151151

152152
## Continuous build status
153153

154154
You can find more community-supported platforms and configurations in the
155-
[TensorFlow SIG Build community builds table](https://github.com/tensorflow/build#community-supported-tensorflow-builds).
155+
[TensorFlow SIG Build Community Builds Table](https://github.com/tensorflow/build#community-supported-tensorflow-builds).
156156

157157
### Official Builds
158158

@@ -190,8 +190,8 @@ Build Type | Status
190190
* [TensorFlow Code Search](https://cs.opensource.google/tensorflow/tensorflow)
191191

192192
Learn more about the
193-
[TensorFlow community](https://www.tensorflow.org/community) and how to
194-
[contribute](https://www.tensorflow.org/community/contribute).
193+
[TensorFlow Community](https://www.tensorflow.org/community) and how to
194+
[Contribute](https://www.tensorflow.org/community/contribute).
195195

196196
## Courses
197197

0 commit comments

Comments
 (0)