chore: import upstream snapshot with attribution
cffconvert / validate (push) Has been skipped
License Check / license-check (push) Failing after 2s

This commit is contained in:
wehub-resource-sync
2026-07-13 12:14:16 +08:00
commit 8a852e4b4e
36502 changed files with 9277225 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# Copyright 2026 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config bzlmod"
+81
View File
@@ -0,0 +1,81 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# Note: this file gets sourced in utilities/setup.sh, which has "set -u"
# (error on undefined variables). This ensures that (a) every TFCI variable
# has an explicit default value, and (b) no script can accidentally use a
# variable that doesn't exist. Please keep this list in alphabetical order.
#
# Find usage in scripts with e.g.:
# cd ci/official
# ls *.sh utilities/*.sh | xargs grep -H --color=always TFCI_ARG_HERE
# You may also get an overview, e.g.:
# cd ci/official
# grep -o '^TFCI\w*' envs/ci_default | xargs -n 1 -I{} bash -c "echo; echo {}; grep -R -H --exclude-dir=envs --color=always '{}'"
TFCI_ARTIFACT_FINAL_GAR_ARGS=
TFCI_ARTIFACT_FINAL_GCS_ENABLE=
TFCI_ARTIFACT_FINAL_GCS_SA_PATH=
TFCI_ARTIFACT_FINAL_GCS_URI=
TFCI_ARTIFACT_FINAL_PYPI_ARGS=
TFCI_ARTIFACT_FINAL_PYPI_ENABLE=
TFCI_ARTIFACT_LATEST_GCS_URI=
TFCI_ARTIFACT_STAGING_GCS_ENABLE=
TFCI_ARTIFACT_STAGING_GCS_URI=
TFCI_BAZEL_BAZELRC_ARGS=
TFCI_BAZEL_COMMON_ARGS=
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=
TFCI_BUILD_PIP_PACKAGE_BASE_ARGS=
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG=
# Mostly meant to be used for Windows.
# For Windows, the same wheel is uploaded to both tensorflow_cpu, and tensorflow
TFCI_BUILD_PIP_PACKAGE_ADDITIONAL_WHEEL_NAMES=
TFCI_DOCKER_ARGS=
TFCI_DOCKER_ENABLE=
TFCI_DOCKER_IMAGE=
TFCI_DOCKER_PULL_ENABLE=
TFCI_DOCKER_REBUILD_ARGS=
TFCI_DOCKER_REBUILD_ENABLE=
TFCI_DOCKER_REBUILD_UPLOAD_ENABLE=
TFCI_FIND_BIN=find
TFCI_GIT_DIR=
TFCI_INDEX_HTML_ENABLE=
TFCI_INSTALLER_WHL_ENABLE=
TFCI_INSTALLER_WHL_NIGHTLY_PROJECT_NAME=
TFCI_INSTALLER_WHL_PROJECT_NAME=
TFCI_INSTALLER_WHL_TAGS=
TFCI_LIB_SUFFIX=
TFCI_MACOS_BAZEL_TEST_DIR_ENABLE=
TFCI_MACOS_BAZEL_TEST_DIR_PATH=
TFCI_MACOS_CROSS_COMPILE_ENABLE=
TFCI_MACOS_CROSS_COMPILE_SDK_DEST=
TFCI_MACOS_CROSS_COMPILE_SDK_SOURCE=
TFCI_MACOS_INSTALL_BAZELISK_ENABLE=
TFCI_MACOS_INSTALL_BAZELISK_URL=
TFCI_MACOS_PYENV_INSTALL_ENABLE=
TFCI_MACOS_TWINE_INSTALL_ENABLE=
TFCI_MACOS_UPGRADE_PYENV_ENABLE=
TFCI_NIGHTLY_UPDATE_VERSION_ENABLE=
TFCI_NVIDIA_SMI_ENABLE=
TFCI_OUTPUT_DIR=
TFCI_PYCPP_SWAP_TO_BUILD_ENABLE=
TFCI_PYTHON_VERIFY_PIP_INSTALL_ARGS=
TFCI_PYTHON_VERSION=
TFCI_WHL_AUDIT_ENABLE=
TFCI_WHL_AUDIT_PLAT=
TFCI_WHL_BAZEL_TEST_ENABLE=
TFCI_BAZEL_HERMETIC_CUDA_UMD_ENABLE=0
TFCI_WHL_IMPORT_TEST_ENABLE=1
TFCI_WHL_NUMPY_VERSION=2
TFCI_WHL_SIZE_LIMIT_ENABLE=
TFCI_WHL_SIZE_LIMIT=
+20
View File
@@ -0,0 +1,20 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# Sourcing this enables local disk cache
if [[ $(uname -s) == "Darwin" ]]; then
echo "Please note that using disk cache on macOS is not recommended because the"
echo "cache can end up being pretty big and make the build process inefficient."
fi
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --disk_cache=$TFCI_OUTPUT_DIR/cache"
+20
View File
@@ -0,0 +1,20 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
#
# Changes the behavior in pycpp.sh from "run all tests" to "verify that all
# tests can compile." Used in some CI jobs (macOS and Linux Arm64) where test
# execution is too expensive.
TFCI_PYCPP_SWAP_TO_BUILD_ENABLE=1
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --build_tests_only"
+32
View File
@@ -0,0 +1,32 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_BAZEL_COMMON_ARGS="--repo_env=HERMETIC_PYTHON_VERSION=$TFCI_PYTHON_VERSION --repo_env=USE_PYWRAP_RULES=True --config release_arm64_linux"
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=linux_arm64
# Note: this is not set to "--cpu", because that changes the package name
# to tensorflow_cpu. These ARM builds are supposed to have the name "tensorflow"
# despite lacking Nvidia CUDA support.
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG="--repo_env=WHEEL_NAME=tensorflow"
TFCI_DOCKER_ENABLE=1
TFCI_DOCKER_IMAGE=us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build-arm64:latest
TFCI_DOCKER_PULL_ENABLE=1
TFCI_DOCKER_REBUILD_ARGS="--target=tf ci/official/containers/ml_build_arm64"
TFCI_INDEX_HTML_ENABLE=1
TFCI_LIB_SUFFIX="-cpu-linux-arm64"
TFCI_OUTPUT_DIR=build_output
TFCI_WHL_AUDIT_ENABLE=1
TFCI_WHL_AUDIT_PLAT=manylinux_2_27_aarch64
TFCI_WHL_BAZEL_TEST_ENABLE=1
TFCI_WHL_SIZE_LIMIT=300M
TFCI_WHL_SIZE_LIMIT_ENABLE=1
@@ -0,0 +1,17 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
source ci/official/envs/linux_arm64
TFCI_BAZEL_COMMON_ARGS="--repo_env=HERMETIC_PYTHON_VERSION=$TFCI_PYTHON_VERSION --config cross_compile_linux_arm64 --repo_env=USE_PYWRAP_RULES=True"
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=cross_compile_linux_arm64
+16
View File
@@ -0,0 +1,16 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
source ci/official/envs/linux_arm64
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --test_env=TF_ENABLE_ONEDNN_OPTS=1"
+29
View File
@@ -0,0 +1,29 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_BAZEL_COMMON_ARGS="--repo_env=HERMETIC_PYTHON_VERSION=$TFCI_PYTHON_VERSION --repo_env=USE_PYWRAP_RULES=True --config release_cpu_linux"
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=linux_cpu
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG="--repo_env=WHEEL_NAME=tensorflow_cpu"
TFCI_DOCKER_ENABLE=1
TFCI_DOCKER_IMAGE=us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest
TFCI_DOCKER_PULL_ENABLE=1
TFCI_DOCKER_REBUILD_ARGS="--target=devel ci/official/containers/ml_build"
TFCI_INDEX_HTML_ENABLE=1
TFCI_LIB_SUFFIX="-cpu-linux-x86_64"
TFCI_OUTPUT_DIR=build_output
TFCI_WHL_AUDIT_ENABLE=1
TFCI_WHL_AUDIT_PLAT=manylinux_2_27_x86_64
TFCI_WHL_BAZEL_TEST_ENABLE=1
TFCI_WHL_SIZE_LIMIT=300M
TFCI_WHL_SIZE_LIMIT_ENABLE=1
+24
View File
@@ -0,0 +1,24 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
source ci/official/envs/linux_x86
export TF_FORCE_GPU_ALLOW_GROWTH=true
TFCI_BAZEL_COMMON_ARGS="--repo_env=HERMETIC_PYTHON_VERSION=$TFCI_PYTHON_VERSION --repo_env=USE_PYWRAP_RULES=True --config release_gpu_linux --test_env=TF_FORCE_GPU_ALLOW_GROWTH=true"
TFCI_BAZEL_HERMETIC_CUDA_UMD_ENABLE=1
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=linux_cuda
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG="--repo_env=WHEEL_NAME=tensorflow"
TFCI_DOCKER_ARGS="--gpus all"
TFCI_LIB_SUFFIX="-gpu-linux-x86_64"
# TODO: Set back to 610M once the wheel size is fixed.
TFCI_WHL_SIZE_LIMIT=630M
+23
View File
@@ -0,0 +1,23 @@
# Copyright 2026 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
source ci/official/envs/linux_x86
TFCI_BAZEL_COMMON_ARGS="--repo_env=HERMETIC_PYTHON_VERSION=$TFCI_PYTHON_VERSION --repo_env=USE_PYWRAP_RULES=True --config release_gpu_linux --config=cuda_nvcc --config=cuda13_version"
TFCI_BAZEL_HERMETIC_CUDA_UMD_ENABLE=1
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=linux_cuda_13_nvcc
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG="--repo_env=WHEEL_NAME=tensorflow_cuda13"
TFCI_DOCKER_ARGS="--gpus all"
TFCI_LIB_SUFFIX="-gpu-linux-x86_64"
# TODO: Set back to 610M once the wheel size is fixed.
TFCI_WHL_SIZE_LIMIT=630M
+40
View File
@@ -0,0 +1,40 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_BAZEL_COMMON_ARGS="--repo_env=HERMETIC_PYTHON_VERSION=$TFCI_PYTHON_VERSION --repo_env=USE_PYWRAP_RULES=True --config release_macos_arm64"
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=macos_arm64
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG="--repo_env=WHEEL_NAME=tensorflow"
TFCI_INDEX_HTML_ENABLE=1
TFCI_LIB_SUFFIX="-cpu-darwin-arm64"
TFCI_MACOS_BAZEL_TEST_DIR_ENABLE=1
TFCI_MACOS_BAZEL_TEST_DIR_PATH="/Volumes/BuildData/bazel_output"
TFCI_OUTPUT_DIR=build_output
TFCI_WHL_BAZEL_TEST_ENABLE=1
TFCI_WHL_SIZE_LIMIT=245M
TFCI_WHL_SIZE_LIMIT_ENABLE=1
# 3.11 is the system python on our images
case $TFCI_PYTHON_VERSION in
3.11)
TFCI_MACOS_PYENV_INSTALL_ENABLE=0
;;
3.13)
TFCI_MACOS_UPGRADE_PYENV_ENABLE=1
TFCI_MACOS_PYENV_INSTALL_ENABLE=1
;;
*)
TFCI_MACOS_PYENV_INSTALL_ENABLE=1
;;
esac
+36
View File
@@ -0,0 +1,36 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# IMPORTANT: trailing slash is required on GCS URIs, as it tells gcloud to
# pretend the path is a directory.
# 1. Upload nightlies
TFCI_ARTIFACT_FINAL_GAR_ARGS="--repository-url https://us-python.pkg.dev/ml-oss-artifacts-published/tf-public-nightly-artifacts-registry/ --verbose"
TFCI_ARTIFACT_FINAL_GCS_ENABLE=1
TFCI_ARTIFACT_FINAL_GCS_SA_PATH="${KOKORO_KEYSTORE_DIR}/73361_tensorflow_release_binary_uploader_service_account"
TFCI_ARTIFACT_FINAL_GCS_URI="gs://tensorflow/nightly/"
TFCI_ARTIFACT_FINAL_PYPI_ARGS="--config-file=$KOKORO_KEYSTORE_DIR/73361_tensorflow_pypirc_using_global_api_token --repository pypi-warehouse --verbose"
TFCI_ARTIFACT_FINAL_PYPI_ENABLE=1
TFCI_ARTIFACT_LATEST_GCS_URI="gs://tensorflow/nightly/latest/"
TFCI_ARTIFACT_STAGING_GCS_ENABLE=1
TFCI_ARTIFACT_STAGING_GCS_URI="gs://tensorflow-ci-staging/staging/nightly/$(git rev-parse HEAD)/"
# 2. The internal version numbers get changed
TFCI_NIGHTLY_UPDATE_VERSION_ENABLE=1
# 3. Push results to public build cache (unique cache for MacOS)
if [[ $(uname -s) == "Darwin" ]]; then
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config tf_public_macos_cache_push"
else
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config tf_public_cache_push"
fi
+16
View File
@@ -0,0 +1,16 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# Disable Docker
TFCI_DOCKER_ENABLE=0
+25
View File
@@ -0,0 +1,25 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# Disable ALL uploads of any kind.
TFCI_ARTIFACT_FINAL_GAR_ARGS=
TFCI_ARTIFACT_FINAL_GCS_ENABLE=
TFCI_ARTIFACT_FINAL_GCS_SA_PATH=
TFCI_ARTIFACT_FINAL_GCS_URI=
TFCI_ARTIFACT_FINAL_PYPI_ARGS=
TFCI_ARTIFACT_FINAL_PYPI_ENABLE=
TFCI_ARTIFACT_LATEST_GCS_URI=
TFCI_ARTIFACT_STAGING_GCS_ENABLE=
TFCI_ARTIFACT_STAGING_GCS_URI=
TFCI_DOCKER_REBUILD_UPLOAD_ENABLE=
+17
View File
@@ -0,0 +1,17 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG="--repo_env=WHEEL_NAME=tf_nightly_numpy1"
TFCI_NIGHTLY_UPDATE_VERSION_ENABLE=1
TFCI_WHL_NUMPY_VERSION=1
+21
View File
@@ -0,0 +1,21 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# Sourcing this enables Bazel remote cache (public, read-only)
# The cache configs are different for MacOS and Linux
if [[ $(uname -s) == "Darwin" ]]; then
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config tf_public_macos_cache"
else
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config tf_public_cache"
fi
+26
View File
@@ -0,0 +1,26 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# Sourcing this enables Bazel remote cache (read and write)
# Note that "_push" cache configs write to GCS buckets and require
# authentication. If you are not a Googler, source "public_cache" to enable the
# public read-only cache.
# The cache configs are different for MacOS and Linux
if [[ $(uname -s) == "Darwin" ]]; then
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config tf_public_macos_cache_push"
else
if [[ ! "$TFCI" =~ "rbe" ]]; then
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config tf_public_cache_push"
fi
fi
+15
View File
@@ -0,0 +1,15 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_PYTHON_VERSION=3.10
+15
View File
@@ -0,0 +1,15 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_PYTHON_VERSION=3.11
+15
View File
@@ -0,0 +1,15 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_PYTHON_VERSION=3.12
+15
View File
@@ -0,0 +1,15 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_PYTHON_VERSION=3.13
+15
View File
@@ -0,0 +1,15 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_PYTHON_VERSION=3.14
+52
View File
@@ -0,0 +1,52 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# Enables RBE as long as RBE is available for the selected platform.
# The "selected" platform is considered to be
# TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX. "Available" means there is
# an entry in tensorflow/.bazelrc for build:rbe_TFCI_BAZEL_TARGET...
# ^^^^
# This env is only valid when RBE is available on the selected platform, since
# it enables a derived --config setting. If RBE is not available (i.e. there
# is no --config setting), bazel would fail and quit. This script does a quick
# check This script checks for such errors early
if ! grep "rbe_$TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX" .bazelrc; then
cat <<EOF
ERROR: RBE was enabled via the 'rbe' env in the 'TFCI' variable.
TFCI: $TFCI
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX is "$TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX".
But in .bazelrc, there is no "rbe_$TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX".
That setting must exist for this script to function correctly.
EOF
exit 1
fi
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config rbe_$TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX"
if [[ `uname -s | grep -P '^MSYS_NT'` ]]; then
if [[ "$TFCI_GITHUB_ACTIONS" != "true" ]]; then
# Docker on Windows doesn't support the `host` networking mode, and so
# port-forwarding is required for the container to detect it's running on GCE.
export IP_ADDR=$(powershell -command "(Get-NetIPAddress -AddressFamily IPv4 -InterfaceAlias 'vEthernet (nat)').IPAddress")
netsh interface portproxy add v4tov4 listenaddress=$IP_ADDR listenport=80 connectaddress=169.254.169.254 connectport=80
# A local firewall rule for the container is added in
# ci/official/utilities/setup_docker.sh.
fi
else
# The volume mapping flag below shares the user's gcloud credentials, if any,
# with the container, in case the user has credentials stored there.
# This would allow Bazel to authenticate for RBE.
# Note: TF's CI does not have any credentials stored there.
TFCI_DOCKER_ARGS="$TFCI_DOCKER_ARGS -v $HOME/.config/gcloud:/root/.config/gcloud"
fi
+29
View File
@@ -0,0 +1,29 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# Release jobs are very basic. They don't use any caching or RBE,
# but they do upload logs to resultstore.
# IMPORTANT: trailing slash is required on GCS URIs, as it tells gcloud to
# pretend the path is a directory.
TFCI_ARTIFACT_FINAL_GCS_ENABLE=1
TFCI_ARTIFACT_FINAL_GCS_SA_PATH="${KOKORO_KEYSTORE_DIR}/73361_tensorflow_release_binary_uploader_service_account"
TFCI_ARTIFACT_FINAL_GCS_URI="gs://tensorflow/versions"
TFCI_ARTIFACT_FINAL_PYPI_ARGS="--config-file=$KOKORO_KEYSTORE_DIR/73361_tensorflow_pypirc_using_global_api_token --repository pypi-warehouse"
TFCI_ARTIFACT_FINAL_PYPI_ENABLE=1
TFCI_ARTIFACT_LATEST_GCS_URI="gs://tensorflow/versions/latest/"
TFCI_ARTIFACT_STAGING_GCS_ENABLE=1
TFCI_ARTIFACT_STAGING_GCS_URI="gs://tensorflow-ci-staging/staging/versions/${_LOUHI_EXECUTION_ID:-$(git rev-parse HEAD)}/"
TFCI_BAZEL_COMMON_ARGS="$TFCI_BAZEL_COMMON_ARGS --config resultstore"
TFCI_BUILD_PIP_PACKAGE_BASE_ARGS="$TFCI_BUILD_PIP_PACKAGE_BASE_ARGS --repo_env=ML_WHEEL_TYPE=release"
+52
View File
@@ -0,0 +1,52 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_DOCKER_ENABLE=1
TFCI_DOCKER_PULL_ENABLE=1
TFCI_DOCKER_IMAGE="gcr.io/tensorflow-testing/tf-win2022@sha256:915cb093630432c38b028f56bd31116a5559ebbc688d427b6092d86828ae03bc"
TFCI_BAZEL_BAZELRC_ARGS="--output_user_root=C:/x"
TFCI_BAZEL_COMMON_ARGS="--repo_env=HERMETIC_PYTHON_VERSION=$TFCI_PYTHON_VERSION --repo_env=USE_PYWRAP_RULES=True --config=windows_x86_cpu_2022"
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=windows_x86_cpu_2022
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG="--repo_env=WHEEL_NAME=tensorflow"
TFCI_BUILD_PIP_PACKAGE_ADDITIONAL_WHEEL_NAMES="tensorflow_cpu"
TFCI_OUTPUT_DIR=build_output
TFCI_FIND_BIN=C:/tools/msys64/usr/bin/find.exe
TFCI_LIB_SUFFIX="-cpu-windows-x86_64"
# auditwheel is not supported for Windows
TFCI_WHL_AUDIT_ENABLE=0
TFCI_WHL_AUDIT_PLAT=0
# Tests are extremely slow at the moment
TFCI_WHL_BAZEL_TEST_ENABLE=0
TFCI_WHL_SIZE_LIMIT=450M
TFCI_WHL_SIZE_LIMIT_ENABLE=1
TFCI_WHL_IMPORT_TEST_ENABLE=1
TFCI_PYTHON_VERIFY_PIP_INSTALL_ARGS=""
# Used to simulate a T:\ drive within the container, to a limited extent,
# via a symlink.
# Helpful since the internal CI utilizes a T:\ drive, part of which is mounted
# to the container, and would result in C:\<path> != T:\<path> mismatches,
# when using variables like `TFCI_OUTPUT_DIR` in `docker exec commands,
# requiring conditional path adjustments throughout the CI scripts.
# Note: This does not work for `docker cp` commands.
# For a little more detail, see:
# https://github.com/tensorflow/tensorflow/blob/cc3006af6fea8d2a1360b3b5e65f9d14bbdb7094/ci/devinfra/docker/windows2022/Dockerfile#L196
TFCI_OUTPUT_WIN_DOCKER_DIR='C:/drive_t'
# Docker on Windows doesn't support the `host` networking mode, and so
# port-forwarding is required for the container to detect it's running on GCE.
export IP_ADDR=$(powershell -command "(Get-NetIPAddress -AddressFamily IPv4 -InterfaceAlias 'vEthernet (nat)').IPAddress")
netsh interface portproxy add v4tov4 listenaddress=$IP_ADDR listenport=80 connectaddress=169.254.169.254 connectport=80
# A local firewall rule for the container is added in
# ci/official/utilities/setup_docker.sh.
@@ -0,0 +1,51 @@
# Copyright 2026 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_DOCKER_ENABLE=1
if [[ "$TFCI_GITHUB_ACTIONS" == "true" ]]; then
TFCI_DOCKER_ENABLE=0
fi
TFCI_DOCKER_PULL_ENABLE=1
TFCI_DOCKER_IMAGE="us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build-windows@sha256:023fa901fda70be8890b05689d0a667287692c1f59d0abe4add7208ec5a12707"
TFCI_BAZEL_BAZELRC_ARGS="--output_user_root=C:/x"
TFCI_BAZEL_COMMON_ARGS="--repo_env=HERMETIC_PYTHON_VERSION=$TFCI_PYTHON_VERSION --repo_env=USE_PYWRAP_RULES=True --config=windows_x86_cpu_2022"
# For RBE, we explicitly set invalid paths to force the auto-configuration to fail.
TFCI_BAZEL_VC="C:/RBE_ISOLATED_INVALID_PATH"
TFCI_BAZEL_LLVM="C:/RBE_ISOLATED_INVALID_PATH"
TFCI_BAZEL_SH="C:/tools/msys64/usr/bin/bash.exe"
TFCI_USE_CLANG_CL=0
# Map TFCI_BAZEL_* to BAZEL_* so cc_configure can find them in the environment.
# We use the shell's default value substitution to ensure that if these are
# already set (e.g. poisoned for RBE), we don't overwrite them with empty values
# before setup.sh has a chance to restore the TFCI_ variables.
export BAZEL_VC="${TFCI_BAZEL_VC:-$BAZEL_VC}"
export BAZEL_LLVM="${TFCI_BAZEL_LLVM:-$BAZEL_LLVM}"
export BAZEL_SH="${TFCI_BAZEL_SH:-$BAZEL_SH}"
export USE_CLANG_CL="${TFCI_USE_CLANG_CL:-$USE_CLANG_CL}"
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=windows_x86_ml_actions
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG="--repo_env=WHEEL_NAME=tensorflow"
TFCI_OUTPUT_DIR=build_output
TFCI_FIND_BIN=C:/tools/msys64/usr/bin/find.exe
TFCI_LIB_SUFFIX="-cpu-windows-x86_64"
# auditwheel is not supported for Windows
TFCI_WHL_AUDIT_ENABLE=0
TFCI_WHL_AUDIT_PLAT=0
# Tests are extremely slow at the moment
TFCI_WHL_BAZEL_TEST_ENABLE=0
TFCI_WHL_SIZE_LIMIT=450M
TFCI_WHL_SIZE_LIMIT_ENABLE=1
TFCI_WHL_IMPORT_TEST_ENABLE=1
TFCI_PYTHON_VERIFY_PIP_INSTALL_ARGS=""
+51
View File
@@ -0,0 +1,51 @@
# Copyright 2026 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
TFCI_DOCKER_ENABLE=1
if [[ "$TFCI_GITHUB_ACTIONS" == "true" ]]; then
TFCI_DOCKER_ENABLE=0
fi
TFCI_DOCKER_PULL_ENABLE=1
TFCI_DOCKER_IMAGE="us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build-windows@sha256:023fa901fda70be8890b05689d0a667287692c1f59d0abe4add7208ec5a12707"
TFCI_BAZEL_BAZELRC_ARGS="--output_user_root=C:/x"
TFCI_BAZEL_COMMON_ARGS="--repo_env=HERMETIC_PYTHON_VERSION=$TFCI_PYTHON_VERSION --repo_env=USE_PYWRAP_RULES=True --config=windows_x86_cpu_2022"
# For RBE, we explicitly set invalid paths to force the auto-configuration to fail.
TFCI_BAZEL_VC="C:/RBE_ISOLATED_INVALID_PATH"
TFCI_BAZEL_LLVM="C:/RBE_ISOLATED_INVALID_PATH"
TFCI_BAZEL_SH="C:/tools/msys64/usr/bin/bash.exe"
TFCI_USE_CLANG_CL=0
# Map TFCI_BAZEL_* to BAZEL_* so cc_configure can find them in the environment.
# We use the shell's default value substitution to ensure that if these are
# already set (e.g. poisoned for RBE), we don't overwrite them with empty values
# before setup.sh has a chance to restore the TFCI_ variables.
export BAZEL_VC="${TFCI_BAZEL_VC:-$BAZEL_VC}"
export BAZEL_LLVM="${TFCI_BAZEL_LLVM:-$BAZEL_LLVM}"
export BAZEL_SH="${TFCI_BAZEL_SH:-$BAZEL_SH}"
export USE_CLANG_CL="${TFCI_USE_CLANG_CL:-$USE_CLANG_CL}"
TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX=windows_x86_ml_actions
TFCI_BUILD_PIP_PACKAGE_WHEEL_NAME_ARG="--repo_env=WHEEL_NAME=tensorflow"
TFCI_OUTPUT_DIR=build_output
TFCI_FIND_BIN=C:/tools/msys64/usr/bin/find.exe
TFCI_LIB_SUFFIX="-cpu-windows-x86_64"
# auditwheel is not supported for Windows
TFCI_WHL_AUDIT_ENABLE=0
TFCI_WHL_AUDIT_PLAT=0
# Tests are extremely slow at the moment
TFCI_WHL_BAZEL_TEST_ENABLE=0
TFCI_WHL_SIZE_LIMIT=450M
TFCI_WHL_SIZE_LIMIT_ENABLE=1
TFCI_WHL_IMPORT_TEST_ENABLE=1
TFCI_PYTHON_VERIFY_PIP_INSTALL_ARGS=""