Skip to content

Commit de0f722

Browse files
authored
Merge pull request #3166 from ROCm/develop-upstream-sync-251208
Develop upstream sync 251208
2 parents 5cff174 + 2e5d65e commit de0f722

1,364 files changed

Lines changed: 44049 additions & 22348 deletions

File tree

Some content is hidden

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

.bazelrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,11 @@ common:cuda --@local_config_cuda//:enable_cuda
299299
common:cuda --config=cuda_version
300300
# This flag is needed to include CUDA libraries.
301301
common:cuda --@local_config_cuda//cuda:include_cuda_libs=true
302-
common:cuda --@cuda_driver//:include_cuda_umd_libs=true
303302

304303
# This configuration is used for building the wheels.
305304
common:cuda_wheel --@local_config_cuda//cuda:include_cuda_libs=false
306-
common:cuda_wheel --@cuda_driver//:include_cuda_umd_libs=false
305+
306+
common:hermetic_cuda_umd --@cuda_driver//:include_cuda_umd_libs=true
307307

308308
# CUDA: This config refers to building CUDA op kernels with clang.
309309
common:cuda_clang --config=cuda
@@ -683,6 +683,8 @@ common:rbe_linux_cuda --config=cuda_clang_official
683683
common:rbe_linux_cuda --config=rbe_linux_cpu
684684
# For Remote build execution -- GPU configuration
685685
common:rbe_linux_cuda --repo_env=REMOTE_GPU_TESTING=1
686+
# Update UMD version when RBE CUDA driver is updated.
687+
common:rbe_linux_cuda --repo_env=HERMETIC_CUDA_UMD_VERSION="13.0.1"
686688

687689
common:rbe_linux_cuda_nvcc --config=rbe_linux_cuda
688690
common:rbe_linux_cuda_nvcc --config=cuda_nvcc

WORKSPACE

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,34 @@ http_archive(
1313
url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.4.1/rules_shell-v0.4.1.tar.gz",
1414
)
1515

16+
# Initialize toolchains for ML projects.
17+
#
18+
# A hermetic build system is designed to produce completely reproducible builds for C++.
19+
# Details: https://github.com/google-ml-infra/rules_ml_toolchain
20+
http_archive(
21+
name = "rules_ml_toolchain",
22+
sha256 = "7f00b3e94bbca1a4737ded6b9ed5358f6d1c86430c2ec97c90081343c0482f18",
23+
strip_prefix = "rules_ml_toolchain-29d54c875da37e74b8548924ed30e78cb28126b9",
24+
urls = [
25+
"https://github.com/yuriivcs/rules_ml_toolchain/archive/29d54c875da37e74b8548924ed30e78cb28126b9.tar.gz",
26+
],
27+
)
28+
29+
load(
30+
"@rules_ml_toolchain//cc/deps:cc_toolchain_deps.bzl",
31+
"cc_toolchain_deps",
32+
)
33+
34+
cc_toolchain_deps()
35+
36+
register_toolchains("@rules_ml_toolchain//cc:linux_x86_64_linux_x86_64")
37+
38+
register_toolchains("@rules_ml_toolchain//cc:linux_x86_64_linux_x86_64_cuda")
39+
40+
register_toolchains("@rules_ml_toolchain//cc:linux_aarch64_linux_aarch64")
41+
42+
register_toolchains("@rules_ml_toolchain//cc:linux_aarch64_linux_aarch64_cuda")
43+
1644
# Initialize the TensorFlow repository and all dependencies.
1745
#
1846
# The cascade of load() statements and tf_workspace?() calls works around the
@@ -91,21 +119,6 @@ nvidia_wheel_versions_repository(
91119

92120
python_wheel_version_suffix_repository(name = "tf_wheel_version_suffix")
93121

94-
load(
95-
"@rules_ml_toolchain//cc/deps:cc_toolchain_deps.bzl",
96-
"cc_toolchain_deps",
97-
)
98-
99-
cc_toolchain_deps()
100-
101-
register_toolchains("@rules_ml_toolchain//cc:linux_x86_64_linux_x86_64")
102-
103-
register_toolchains("@rules_ml_toolchain//cc:linux_x86_64_linux_x86_64_cuda")
104-
105-
register_toolchains("@rules_ml_toolchain//cc:linux_aarch64_linux_aarch64")
106-
107-
register_toolchains("@rules_ml_toolchain//cc:linux_aarch64_linux_aarch64_cuda")
108-
109122
load(
110123
"@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
111124
"cuda_json_init_repository",

ci/official/envs/linux_arm64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ TFCI_OUTPUT_DIR=build_output
2828
TFCI_WHL_AUDIT_ENABLE=1
2929
TFCI_WHL_AUDIT_PLAT=manylinux2014_aarch64
3030
TFCI_WHL_BAZEL_TEST_ENABLE=1
31-
TFCI_WHL_SIZE_LIMIT=270M
31+
TFCI_WHL_SIZE_LIMIT=275M
3232
TFCI_WHL_SIZE_LIMIT_ENABLE=1

ci/official/pycpp.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ if [[ "$TFCI_WHL_NUMPY_VERSION" == 1 ]]; then
2929
fi
3030

3131
if [[ $TFCI_PYCPP_SWAP_TO_BUILD_ENABLE == 1 ]]; then
32-
tfrun bazel $TFCI_BAZEL_BAZELRC_ARGS build $TFCI_BAZEL_COMMON_ARGS --profile "$PROFILE_JSON_PATH" --@local_config_cuda//cuda:override_include_cuda_libs=true --config="${TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX}_pycpp_test"
32+
tfrun bazel $TFCI_BAZEL_BAZELRC_ARGS build $TFCI_BAZEL_COMMON_ARGS --profile "$PROFILE_JSON_PATH" --@local_config_cuda//cuda:override_include_cuda_libs=true --config=hermetic_cuda_umd --config="${TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX}_pycpp_test"
3333
else
34-
tfrun bazel $TFCI_BAZEL_BAZELRC_ARGS test $TFCI_BAZEL_COMMON_ARGS --profile "$PROFILE_JSON_PATH" --@local_config_cuda//cuda:override_include_cuda_libs=true --config="${TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX}_pycpp_test"
34+
tfrun bazel $TFCI_BAZEL_BAZELRC_ARGS test $TFCI_BAZEL_COMMON_ARGS --profile "$PROFILE_JSON_PATH" --@local_config_cuda//cuda:override_include_cuda_libs=true --config=hermetic_cuda_umd --config="${TFCI_BAZEL_TARGET_SELECTING_CONFIG_PREFIX}_pycpp_test"
3535
fi
3636

3737
# Note: the profile can be viewed by visiting chrome://tracing in a Chrome browser.

tensorflow/c/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,7 @@ tf_cuda_library(
739739
"//tensorflow/core/platform:stringpiece",
740740
"//tensorflow/core/platform:types",
741741
"@com_google_absl//absl/status",
742+
"@com_google_absl//absl/strings:string_view",
742743
],
743744
)
744745

tensorflow/c/env.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ limitations under the License.
1818
#include <cstddef>
1919
#include <cstdint>
2020
#include <memory>
21+
#include <string>
2122
#include <vector>
2223

2324
#include "absl/status/status.h"
25+
#include "absl/strings/string_view.h"
2426
#include "tensorflow/c/c_api_macros.h"
2527
#include "tensorflow/c/tf_file_statistics.h"
2628
#include "tensorflow/c/tf_status.h"

tensorflow/c/env_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616
#include "tensorflow/c/env.h"
1717

1818
#include <cstring>
19+
#include <string>
1920

2021
#include "tensorflow/c/tf_file_statistics.h"
2122
#include "tensorflow/c/tf_status.h"

tensorflow/c/experimental/saved_model/internal/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,5 +375,6 @@ tf_cc_test(
375375
"//tensorflow/core:test",
376376
"//tensorflow/core:test_main",
377377
"@com_google_absl//absl/status",
378+
"@com_google_absl//absl/strings:string_view",
378379
],
379380
)

tensorflow/c/experimental/saved_model/internal/saved_model_api_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ limitations under the License.
2020
#include <vector>
2121

2222
#include "absl/status/status.h"
23+
#include "absl/strings/string_view.h"
2324
#include "tensorflow/c/eager/c_api.h"
2425
#include "tensorflow/c/eager/c_api_experimental.h"
2526
#include "tensorflow/c/eager/c_api_test_util.h"

tensorflow/cc/framework/fuzzing/cc_op_fuzz_gen.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ limitations under the License.
2626
#include "absl/log/log.h"
2727
#include "absl/strings/str_cat.h"
2828
#include "absl/strings/str_join.h"
29+
#include "absl/strings/string_view.h"
2930
#include "absl/strings/substitute.h"
3031
#include "tensorflow/cc/framework/cc_op_gen_util.h"
3132
#include "tensorflow/core/framework/api_def.pb.h"

0 commit comments

Comments
 (0)