From e435325dab939577799e1e74d62b62792660efda Mon Sep 17 00:00:00 2001 From: David Dunleavy Date: Wed, 20 Nov 2024 17:21:33 -0800 Subject: [PATCH] Move `tsl/platform/{cloud,default,windows}` to `xla/tsl/platform` PiperOrigin-RevId: 698575496 --- tensorflow/BUILD | 2 +- .../compiler/mlir/tools/kernel_gen/BUILD | 8 +- .../mlir/tools/kernel_gen/transforms/BUILD | 2 +- tensorflow/compiler/tf2tensorrt/BUILD | 2 +- tensorflow/compiler/tf2xla/BUILD | 30 +- tensorflow/core/BUILD | 11 +- .../core/common_runtime/eager/context.cc | 4 +- tensorflow/core/common_runtime/session.cc | 8 +- .../distributed_runtime/worker_session.cc | 8 +- tensorflow/core/kernels/rnn/BUILD | 2 +- tensorflow/core/kernels/sparse_matmul_op.h | 2 +- tensorflow/core/lib/gif/BUILD | 4 +- tensorflow/core/lib/jpeg/BUILD | 4 +- tensorflow/core/platform/BUILD | 8 +- .../core/platform/build_config_root.bzl | 2 +- tensorflow/core/platform/cloud/BUILD | 32 +- .../core/platform/cloud/auth_provider.h | 2 +- .../cloud/compute_engine_metadata_client.h | 2 +- .../cloud/compute_engine_zone_provider.h | 2 +- .../core/platform/cloud/curl_http_request.h | 2 +- .../core/platform/cloud/expiring_lru_cache.h | 2 +- .../core/platform/cloud/file_block_cache.h | 2 +- .../core/platform/cloud/gcs_file_system.h | 2 +- tensorflow/core/platform/cloud/gcs_throttle.h | 2 +- .../platform/cloud/google_auth_provider.h | 2 +- tensorflow/core/platform/cloud/http_request.h | 2 +- .../core/platform/cloud/http_request_fake.h | 2 +- .../core/platform/cloud/now_seconds_env.h | 2 +- tensorflow/core/platform/cloud/oauth_client.h | 2 +- .../platform/cloud/ram_file_block_cache.h | 2 +- tensorflow/core/platform/cloud/time_util.h | 2 +- .../core/platform/cloud/zone_provider.h | 2 +- tensorflow/core/platform/rules_cc.bzl | 2 +- tensorflow/core/platform/tracing.h | 4 +- tensorflow/core/profiler/backends/gpu/BUILD | 2 +- .../lite/acceleration/configuration/BUILD | 2 +- .../acceleration/configuration/BUILD | 2 +- tensorflow/lite/kernels/CMakeLists.txt | 6 +- tensorflow/python/BUILD | 2 +- third_party/gpus/cuda_configure.bzl | 2 +- third_party/nccl/system.BUILD.tpl | 2 +- third_party/pprof.BUILD | 2 +- third_party/riegeli_fix.patch | 2 +- .../tsl/third_party/gpus/cuda_configure.bzl | 2 +- .../tsl/third_party/nccl/system.BUILD.tpl | 2 +- .../xla/third_party/tsl/tsl/platform/BUILD | 3 +- .../tsl/tsl/platform/build_config.bzl | 2 +- .../tsl/tsl/platform/build_config_root.bzl | 2 +- .../xla/third_party/tsl/tsl/platform/casts.h | 4 +- .../third_party/tsl/tsl/platform/context.h | 4 +- .../tsl/tsl/platform/crash_analysis.h | 4 +- .../tsl/tsl/platform/criticality.h | 4 +- .../third_party/tsl/tsl/platform/dso_loader.h | 4 +- .../xla/third_party/tsl/tsl/platform/env.cc | 2 +- .../third_party/tsl/tsl/platform/logging.h | 4 +- .../xla/third_party/tsl/tsl/platform/mutex.h | 8 +- .../tsl/tsl/platform/profile_utils/BUILD | 2 +- .../third_party/tsl/tsl/platform/rules_cc.bzl | 2 +- .../third_party/tsl/tsl/platform/stacktrace.h | 6 +- .../xla/third_party/tsl/tsl/platform/status.h | 4 +- .../third_party/tsl/tsl/platform/statusor.h | 4 +- .../third_party/tsl/tsl/platform/subprocess.h | 6 +- .../third_party/tsl/tsl/platform/tracing.h | 4 +- .../xla/third_party/tsl/tsl/platform/types.h | 4 +- .../tsl/tsl/platform/unbounded_work_queue.h | 4 +- .../third_party/tsl/tsl/profiler/lib/BUILD | 8 +- third_party/xla/xla/BUILD | 2 +- .../xla/xla/backends/profiler/gpu/BUILD | 8 +- third_party/xla/xla/hlo/pass/BUILD | 8 +- third_party/xla/xla/hlo/testlib/BUILD | 8 +- third_party/xla/xla/hlo/transforms/BUILD | 8 +- third_party/xla/xla/lit.bzl | 2 +- third_party/xla/xla/pjrt/c/BUILD | 8 +- third_party/xla/xla/python/BUILD | 2 +- third_party/xla/xla/service/BUILD | 8 +- third_party/xla/xla/service/gpu/BUILD | 8 +- .../xla/xla/service/gpu/autotuning/BUILD | 8 +- .../xla/xla/service/gpu/build_defs.bzl | 2 +- third_party/xla/xla/service/gpu/fusions/BUILD | 2 +- .../xla/xla/service/gpu/fusions/triton/BUILD | 2 +- third_party/xla/xla/service/gpu/kernels/BUILD | 8 +- .../xla/service/gpu/llvm_gpu_backend/BUILD | 8 +- third_party/xla/xla/service/gpu/model/BUILD | 2 +- third_party/xla/xla/service/gpu/runtime/BUILD | 2 +- third_party/xla/xla/service/gpu/tests/BUILD | 8 +- .../xla/xla/service/gpu/transforms/BUILD | 8 +- third_party/xla/xla/service/llvm_ir/BUILD | 8 +- third_party/xla/xla/stream_executor/BUILD | 2 +- .../xla/xla/stream_executor/cuda/BUILD | 8 +- third_party/xla/xla/stream_executor/gpu/BUILD | 8 +- third_party/xla/xla/tests/BUILD | 8 +- third_party/xla/xla/tools/BUILD | 8 +- third_party/xla/xla/tools/hlo_opt/BUILD | 12 +- third_party/xla/xla/tsl/cuda/BUILD.bazel | 2 +- third_party/xla/xla/tsl/lib/gtl/BUILD | 2 +- .../tsl => xla}/tsl/platform/cloud/BUILD | 334 +++++++++--------- .../tsl/platform/cloud/auth_provider.h | 6 +- .../cloud/compute_engine_metadata_client.cc | 4 +- .../cloud/compute_engine_metadata_client.h | 8 +- .../compute_engine_metadata_client_test.cc | 4 +- .../cloud/compute_engine_zone_provider.cc | 2 +- .../cloud/compute_engine_zone_provider.h | 10 +- .../compute_engine_zone_provider_test.cc | 4 +- .../tsl/platform/cloud/curl_http_request.cc | 2 +- .../tsl/platform/cloud/curl_http_request.h | 8 +- .../platform/cloud/curl_http_request_test.cc | 2 +- .../tsl/platform/cloud/expiring_lru_cache.h | 6 +- .../platform/cloud/expiring_lru_cache_test.cc | 4 +- .../tsl/platform/cloud/file_block_cache.h | 6 +- .../tsl/platform/cloud/gcs_dns_cache.cc | 2 +- .../tsl/platform/cloud/gcs_dns_cache.h | 8 +- .../tsl/platform/cloud/gcs_dns_cache_test.cc | 2 +- .../tsl/platform/cloud/gcs_file_system.cc | 12 +- .../tsl/platform/cloud/gcs_file_system.h | 22 +- .../platform/cloud/gcs_file_system_test.cc | 4 +- .../tsl/platform/cloud/gcs_throttle.cc | 2 +- .../tsl/platform/cloud/gcs_throttle.h | 6 +- .../tsl/platform/cloud/gcs_throttle_test.cc | 2 +- .../platform/cloud/google_auth_provider.cc | 2 +- .../tsl/platform/cloud/google_auth_provider.h | 12 +- .../cloud/google_auth_provider_test.cc | 7 +- .../tsl/platform/cloud/http_request.h | 6 +- .../tsl/platform/cloud/http_request_fake.h | 8 +- .../tsl/platform/cloud/now_seconds_env.h | 6 +- .../tsl/platform/cloud/oauth_client.cc | 4 +- .../tsl/platform/cloud/oauth_client.h | 8 +- .../tsl/platform/cloud/oauth_client_test.cc | 7 +- .../platform/cloud/ram_file_block_cache.cc | 2 +- .../tsl/platform/cloud/ram_file_block_cache.h | 8 +- .../cloud/ram_file_block_cache_test.cc | 4 +- .../tsl/platform/cloud/testdata/BUILD | 8 +- .../application_default_credentials.json | 0 .../testdata/service_account_credentials.json | 0 .../testdata/service_account_public_key.txt | 0 .../tsl/platform/cloud/time_util.cc | 2 +- .../tsl/platform/cloud/time_util.h | 6 +- .../tsl/platform/cloud/time_util_test.cc | 2 +- .../tsl/platform/cloud/zone_provider.h | 6 +- .../tsl => xla}/tsl/platform/default/BUILD | 287 +++++++-------- .../tsl/platform/default/build_config.bzl | 62 ++-- .../platform/default/build_config_root.bzl | 24 +- .../tsl => xla}/tsl/platform/default/casts.h | 6 +- .../tsl/platform/default/context.h | 6 +- .../tsl/platform/default/crash_analysis.cc | 2 +- .../tsl/platform/default/crash_analysis.h | 6 +- .../tsl/platform/default/criticality.h | 6 +- .../tsl/platform/default/cuda_build_defs.bzl | 0 .../tsl/platform/default/cuda_root_path.cc | 0 .../tsl/platform/default/dlopen_checker.cc | 2 +- .../platform/default/dlopen_checker_stub.cc | 2 +- .../tsl/platform/default/dso_loader.cc | 2 +- .../tsl/platform/default/dso_loader.h | 6 +- .../tsl => xla}/tsl/platform/default/env.cc | 2 +- .../tsl/platform/default/env_time.cc | 0 .../tsl/platform/default/error_logging.cc | 0 .../tsl/platform/default/grpc_credentials.cc | 0 .../platform/default/human_readable_json.cc | 0 .../tsl/platform/default/integral_types.h | 8 +- .../tsl/platform/default/load_library.cc | 0 .../tsl/platform/default/logging.cc | 2 +- .../tsl/platform/default/logging.h | 8 +- .../tsl => xla}/tsl/platform/default/mutex.cc | 0 .../tsl => xla}/tsl/platform/default/mutex.h | 8 +- .../tsl/platform/default/mutex_data.h | 6 +- .../tsl => xla}/tsl/platform/default/net.cc | 0 .../tsl/platform/default/platform.bzl | 0 .../tsl => xla}/tsl/platform/default/port.cc | 2 +- .../tsl/platform/default/posix_file_system.cc | 2 +- .../tsl/platform/default/posix_file_system.h | 6 +- .../tsl/platform/default/resource.cc | 0 .../tsl/platform/default/rocm_rocdl_path.cc | 0 .../tsl/platform/default/rules_cc.bzl | 0 .../tsl/platform/default/stacktrace.h | 6 +- .../platform/default/stacktrace_handler.cc | 0 .../tsl => xla}/tsl/platform/default/status.h | 6 +- .../tsl/platform/default/statusor.h | 6 +- .../tsl/platform/default/subprocess.cc | 0 .../tsl/platform/default/subprocess.h | 6 +- .../tsl/platform/default/tracing.cc | 0 .../tsl/platform/default/tracing_impl.h | 6 +- .../platform/default/unbounded_work_queue.cc | 2 +- .../platform/default/unbounded_work_queue.h | 6 +- .../tsl => xla}/tsl/platform/windows/BUILD | 144 ++++---- .../tsl => xla}/tsl/platform/windows/env.cc | 4 +- .../tsl/platform/windows/env_time.cc | 0 .../tsl/platform/windows/error_windows.cc | 2 +- .../tsl/platform/windows/error_windows.h | 6 +- .../tsl/platform/windows/intrinsics_port.h | 6 +- .../tsl/platform/windows/load_library.cc | 2 +- .../tsl => xla}/tsl/platform/windows/net.cc | 2 +- .../tsl => xla}/tsl/platform/windows/port.cc | 0 .../tsl/platform/windows/stacktrace.cc | 2 +- .../tsl/platform/windows/stacktrace.h | 6 +- .../platform/windows/stacktrace_handler.cc | 0 .../tsl/platform/windows/subprocess.cc | 0 .../tsl/platform/windows/subprocess.h | 6 +- .../tsl/platform/windows/wide_char.cc | 2 +- .../tsl/platform/windows/wide_char.h | 6 +- .../platform/windows/windows_file_system.cc | 6 +- .../platform/windows/windows_file_system.h | 7 +- .../xla/xla/tsl/profiler/backends/cpu/BUILD | 7 +- third_party/xla/xla/tsl/profiler/utils/BUILD | 2 +- third_party/xla/xla/xla.bzl | 10 +- 203 files changed, 863 insertions(+), 856 deletions(-) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/BUILD (50%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/auth_provider.h (90%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/compute_engine_metadata_client.cc (94%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/compute_engine_metadata_client.h (90%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/compute_engine_metadata_client_test.cc (96%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/compute_engine_zone_provider.cc (96%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/compute_engine_zone_provider.h (79%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/compute_engine_zone_provider_test.cc (94%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/curl_http_request.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/curl_http_request.h (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/curl_http_request_test.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/expiring_lru_cache.h (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/expiring_lru_cache_test.cc (98%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/file_block_cache.h (96%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/gcs_dns_cache.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/gcs_dns_cache.h (92%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/gcs_dns_cache_test.cc (98%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/gcs_file_system.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/gcs_file_system.h (96%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/gcs_file_system_test.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/gcs_throttle.cc (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/gcs_throttle.h (96%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/gcs_throttle_test.cc (98%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/google_auth_provider.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/google_auth_provider.h (87%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/google_auth_provider_test.cc (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/http_request.h (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/http_request_fake.h (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/now_seconds_env.h (88%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/oauth_client.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/oauth_client.h (91%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/oauth_client_test.cc (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/ram_file_block_cache.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/ram_file_block_cache.h (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/ram_file_block_cache_test.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/testdata/BUILD (70%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/testdata/application_default_credentials.json (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/testdata/service_account_credentials.json (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/testdata/service_account_public_key.txt (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/time_util.cc (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/time_util.h (85%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/time_util_test.cc (96%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/cloud/zone_provider.h (89%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/BUILD (59%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/build_config.bzl (93%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/build_config_root.bzl (77%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/casts.h (96%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/context.h (85%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/crash_analysis.cc (95%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/crash_analysis.h (90%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/criticality.h (84%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/cuda_build_defs.bzl (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/cuda_root_path.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/dlopen_checker.cc (98%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/dlopen_checker_stub.cc (95%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/dso_loader.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/dso_loader.h (95%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/env.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/env_time.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/error_logging.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/grpc_credentials.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/human_readable_json.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/integral_types.h (81%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/load_library.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/logging.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/logging.h (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/mutex.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/mutex.h (85%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/mutex_data.h (84%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/net.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/platform.bzl (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/port.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/posix_file_system.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/posix_file_system.h (94%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/resource.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/rocm_rocdl_path.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/rules_cc.bzl (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/stacktrace.h (93%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/stacktrace_handler.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/status.h (83%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/statusor.h (88%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/subprocess.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/subprocess.h (96%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/tracing.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/tracing_impl.h (88%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/unbounded_work_queue.cc (98%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/default/unbounded_work_queue.h (92%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/BUILD (51%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/env.cc (98%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/env_time.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/error_windows.cc (96%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/error_windows.h (88%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/intrinsics_port.h (88%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/load_library.cc (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/net.cc (98%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/port.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/stacktrace.cc (98%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/stacktrace.h (89%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/stacktrace_handler.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/subprocess.cc (100%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/subprocess.h (96%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/wide_char.cc (97%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/wide_char.h (83%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/windows_file_system.cc (99%) rename third_party/xla/{third_party/tsl => xla}/tsl/platform/windows/windows_file_system.h (94%) diff --git a/tensorflow/BUILD b/tensorflow/BUILD index cfa2933a055..6fec482d068 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -1489,7 +1489,7 @@ tf_cc_shared_library( # To avoid duplication, check that the C++ or python library does not depend on # the stream executor cuda plugins. Targets that want to use cuda APIs should -# instead depend on the dummy plugins in @local_tsl//tsl/platform/default/build_config +# instead depend on the dummy plugins in //tensorflow/compiler/xla/tsl/platform/default/build_config # and use header only targets. # TODO(ddunleavy): This seems completely broken. :tensorflow_cc depends on # cuda_platform from tf_additional_binary_deps and this doesn't break. diff --git a/tensorflow/compiler/mlir/tools/kernel_gen/BUILD b/tensorflow/compiler/mlir/tools/kernel_gen/BUILD index b5b1a3e8c27..d706babc9b3 100644 --- a/tensorflow/compiler/mlir/tools/kernel_gen/BUILD +++ b/tensorflow/compiler/mlir/tools/kernel_gen/BUILD @@ -2,14 +2,14 @@ load( "@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured", ) -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load( "@local_xla//xla/stream_executor:build_defs.bzl", "if_gpu_is_configured", ) +load( + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) load( "//tensorflow:tensorflow.bzl", "check_deps", diff --git a/tensorflow/compiler/mlir/tools/kernel_gen/transforms/BUILD b/tensorflow/compiler/mlir/tools/kernel_gen/transforms/BUILD index a74409d3f78..2ddadfe5cf9 100644 --- a/tensorflow/compiler/mlir/tools/kernel_gen/transforms/BUILD +++ b/tensorflow/compiler/mlir/tools/kernel_gen/transforms/BUILD @@ -4,7 +4,7 @@ load( "if_rocm_is_configured", ) load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured", ) load("//tensorflow:tensorflow.default.bzl", "get_compatible_with_portable") diff --git a/tensorflow/compiler/tf2tensorrt/BUILD b/tensorflow/compiler/tf2tensorrt/BUILD index bdaaaa384cb..53055ef4915 100644 --- a/tensorflow/compiler/tf2tensorrt/BUILD +++ b/tensorflow/compiler/tf2tensorrt/BUILD @@ -5,7 +5,7 @@ load("@local_config_tensorrt//:build_defs.bzl", "if_tensorrt") load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", "cuda_rpath_flags", ) load("//tensorflow:strict.default.bzl", "py_strict_library") diff --git a/tensorflow/compiler/tf2xla/BUILD b/tensorflow/compiler/tf2xla/BUILD index cbcaa52cd57..97e1c2b05d2 100644 --- a/tensorflow/compiler/tf2xla/BUILD +++ b/tensorflow/compiler/tf2xla/BUILD @@ -5,13 +5,13 @@ load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured") # copybara:uncomment_end load("@local_tsl//tsl/platform:build_config_root.bzl", "if_static") -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("@local_xla//xla:xla.bzl", "xla_py_proto_library") load("@local_xla//xla/service/cpu:build_defs.bzl", "runtime_copts") load("@local_xla//xla/tsl/mkl:build_defs.bzl", "mkl_deps") +load( + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) load("//tensorflow:strict.default.bzl", "py_strict_library") load("//tensorflow:tensorflow.bzl", "if_google", "if_libtpu", "tf_cc_binary", "tf_cc_test", "tf_copts", "tf_cuda_cc_test", "tf_gen_op_wrapper_py", "tf_openmp_copts") load("//tensorflow:tensorflow.default.bzl", "cuda_py_strict_test", "filegroup", "get_compatible_with_portable") @@ -351,17 +351,17 @@ cc_library( # "@local_tsl//tsl/platform:thread_annotations", # "@local_tsl//tsl/platform:tstring", # "@local_tsl//tsl/platform:types", -# "@local_tsl//tsl/platform/default:cord", -# "@local_tsl//tsl/platform/default:env_time", -# "@local_tsl//tsl/platform/default:logging", -# "@local_tsl//tsl/platform/default:mutex", -# "@local_tsl//tsl/platform/default:types", -# "@local_tsl//tsl/platform/google:cord", -# "@local_tsl//tsl/platform/google:env_time", -# "@local_tsl//tsl/platform/google:logging", -# "@local_tsl//tsl/platform/google:mutex", -# "@local_tsl//tsl/platform/google:types", -# "@local_tsl//tsl/platform/windows:env_time", +# "@local_xla//xla/tsl/platform/default:cord", +# "@local_xla//xla/tsl/platform/default:env_time", +# "@local_xla//xla/tsl/platform/default:logging", +# "@local_xla//xla/tsl/platform/default:mutex", +# "@local_xla//xla/tsl/platform/default:types", +# "@local_xla//xla/tsl/platform/google:cord", +# "@local_xla//xla/tsl/platform/google:env_time", +# "@local_xla//xla/tsl/platform/google:logging", +# "@local_xla//xla/tsl/platform/google:mutex", +# "@local_xla//xla/tsl/platform/google:types", +# "@local_xla//xla/tsl/platform/windows:env_time", # "//tensorflow/core/platform:bfloat16", # "//tensorflow/core/platform:blocking_counter", # "//tensorflow/core/platform:byte_order", diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 3c99d2eb152..e7bf4a2b0ad 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -64,8 +64,6 @@ # Placeholder: load py_proto_library load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_config_tensorrt//:build_defs.bzl", "if_tensorrt") -# load("//tools/build_defs/go:go_library.bzl", "go_library") - load( "@local_xla//xla/tsl/mkl:build_defs.bzl", "if_mkl", @@ -123,6 +121,7 @@ load( "//tensorflow/core/platform:rules_cc.bzl", "cc_library", ) +# load("//tools/build_defs/go:go_library.bzl", "go_library") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -490,10 +489,10 @@ cc_library( "//tensorflow/core/framework:type_traits.h", "//tensorflow/core/platform:framework_lite_hdrs", "@local_tsl//tsl/platform:framework_lite_hdrs", - "@local_tsl//tsl/platform/default:integral_types.h", - "@local_tsl//tsl/platform/default:logging.h", "@local_xla//xla/tsl/framework:numeric_types.h", "@local_xla//xla/tsl/framework:type_traits.h", + "@local_xla//xla/tsl/platform/default:integral_types.h", + "@local_xla//xla/tsl/platform/default:logging.h", ], visibility = ["//visibility:public"], deps = @@ -1521,8 +1520,8 @@ cc_library( hdrs = [ "//tensorflow/core/platform:tflite_portable_logging_hdrs", "@local_tsl//tsl/platform:tflite_portable_logging_hdrs", - "@local_tsl//tsl/platform/default:integral_types.h", - "@local_tsl//tsl/platform/default:logging.h", + "@local_xla//xla/tsl/platform/default:integral_types.h", + "@local_xla//xla/tsl/platform/default:logging.h", ], compatible_with = get_compatible_with_portable(), copts = tf_copts(), diff --git a/tensorflow/core/common_runtime/eager/context.cc b/tensorflow/core/common_runtime/eager/context.cc index 67e11021bce..de8c208c4b9 100644 --- a/tensorflow/core/common_runtime/eager/context.cc +++ b/tensorflow/core/common_runtime/eager/context.cc @@ -168,8 +168,8 @@ EagerContext::EagerContext( &func_lib_def_, opts.config.graph_options().optimizer_options(), thread_pool_.get(), cluster_flr); // Starts exporting metrics through a platform-specific monitoring API (if - // provided). For builds using "tensorflow/tsl/platform/default", this is - // currently a no-op. + // provided). For builds using "tensorflow/compiler/xla/tsl/platform/default", + // this is currently a no-op. eager_context_created->GetCell()->Set(true); InitPrioritizedDeviceTypeList(); runner_ = [this](std::function closure) { diff --git a/tensorflow/core/common_runtime/session.cc b/tensorflow/core/common_runtime/session.cc index a48bfe33895..ab0d769ceeb 100644 --- a/tensorflow/core/common_runtime/session.cc +++ b/tensorflow/core/common_runtime/session.cc @@ -63,8 +63,8 @@ absl::Status Session::PRun( Session* NewSession(const SessionOptions& options) { // Starts exporting metrics through a platform-specific monitoring API (if - // provided). For builds using "tensorflow/tsl/platform/default", this is - // currently a no-op. + // provided). For builds using "tensorflow/compiler/xla/tsl/platform/default", + // this is currently a no-op. SetSessionCreatedMetric(); Session* out_session; absl::Status s = NewSession(options, &out_session); @@ -84,8 +84,8 @@ absl::Status NewSession(const SessionOptions& options, Session** out_session) { return s; } // Starts exporting metrics through a platform-specific monitoring API (if - // provided). For builds using "tensorflow/tsl/platform/default", this is - // currently a no-op. + // provided). For builds using "tensorflow/compiler/xla/tsl/platform/default", + // this is currently a no-op. SetSessionCreatedMetric(); s = factory->NewSession(options, out_session); if (!s.ok()) { diff --git a/tensorflow/core/distributed_runtime/worker_session.cc b/tensorflow/core/distributed_runtime/worker_session.cc index 1b4592a54d9..d40e409d227 100644 --- a/tensorflow/core/distributed_runtime/worker_session.cc +++ b/tensorflow/core/distributed_runtime/worker_session.cc @@ -142,8 +142,8 @@ WorkerSession::WorkerSession( borrowed_device_mgr_(nullptr), remote_device_mgr_(std::move(remote_device_mgr)) { // Starts exporting metrics through a platform-specific monitoring API (if - // provided). For builds using "tensorflow/tsl/platform/default", this is - // currently a no-op. + // provided). For builds using "tensorflow/compiler/xla/tsl/platform/default", + // this is currently a no-op. worker_session_created->GetCell()->Set(true); } @@ -191,8 +191,8 @@ WorkerSession::WorkerSession( borrowed_device_mgr_(borrowed_device_mgr), remote_device_mgr_(std::move(remote_device_mgr)) { // Starts exporting metrics through a platform-specific monitoring API (if - // provided). For builds using "tensorflow/tsl/platform/default", this is - // currently a no-op. + // provided). For builds using "tensorflow/compiler/xla/tsl/platform/default", + // this is currently a no-op. worker_session_created->GetCell()->Set(true); } diff --git a/tensorflow/core/kernels/rnn/BUILD b/tensorflow/core/kernels/rnn/BUILD index d3d0d1fa3a5..3b9298c5bac 100644 --- a/tensorflow/core/kernels/rnn/BUILD +++ b/tensorflow/core/kernels/rnn/BUILD @@ -6,7 +6,7 @@ load( "if_rocm_is_configured", ) load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured", ) load( diff --git a/tensorflow/core/kernels/sparse_matmul_op.h b/tensorflow/core/kernels/sparse_matmul_op.h index 9906fe772db..589a65afeab 100644 --- a/tensorflow/core/kernels/sparse_matmul_op.h +++ b/tensorflow/core/kernels/sparse_matmul_op.h @@ -21,7 +21,7 @@ limitations under the License. #include "tensorflow/core/platform/types.h" #if defined(PLATFORM_WINDOWS) -#include "tsl/platform/windows/intrinsics_port.h" +#include "xla/tsl/platform/windows/intrinsics_port.h" #endif namespace Eigen { diff --git a/tensorflow/core/lib/gif/BUILD b/tensorflow/core/lib/gif/BUILD index 7816383907c..d91845aa87d 100644 --- a/tensorflow/core/lib/gif/BUILD +++ b/tensorflow/core/lib/gif/BUILD @@ -51,8 +51,8 @@ cc_library( "//tensorflow/core/lib/gtl:legacy_android_gif_internal_headers", "//tensorflow/core/platform:gif_internal_hdrs", "@local_tsl//tsl/platform:gif_internal_hdrs", - "@local_tsl//tsl/platform/default:integral_types.h", - "@local_tsl//tsl/platform/default:logging.h", + "@local_xla//xla/tsl/platform/default:integral_types.h", + "@local_xla//xla/tsl/platform/default:logging.h", ], copts = tf_copts(), features = ["-layering_check"], diff --git a/tensorflow/core/lib/jpeg/BUILD b/tensorflow/core/lib/jpeg/BUILD index cfaa78f1f79..11c49bc81f1 100644 --- a/tensorflow/core/lib/jpeg/BUILD +++ b/tensorflow/core/lib/jpeg/BUILD @@ -58,8 +58,8 @@ cc_library( "//tensorflow/core/lib/core:legacy_lib_core_stringpiece_header", "//tensorflow/core/platform:jpeg_internal_hdrs", "@local_tsl//tsl/platform:jpeg_internal_hdrs", - "@local_tsl//tsl/platform/default:integral_types.h", - "@local_tsl//tsl/platform/default:logging.h", + "@local_xla//xla/tsl/platform/default:integral_types.h", + "@local_xla//xla/tsl/platform/default:logging.h", ], copts = tf_copts(), linkopts = if_android(["-ldl"]), diff --git a/tensorflow/core/platform/BUILD b/tensorflow/core/platform/BUILD index bed1fde055f..09c1b71fcda 100644 --- a/tensorflow/core/platform/BUILD +++ b/tensorflow/core/platform/BUILD @@ -14,7 +14,7 @@ load( "if_rocm_is_configured", ) load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured", ) load("//tensorflow:strict.default.bzl", "py_strict_test") @@ -454,7 +454,7 @@ filegroup( "types.h", ":ctstring", ] + if_windows([ - "@local_tsl//tsl/platform/windows:xla_cpu_runtime_srcs", + "@local_xla//xla/tsl/platform/windows:xla_cpu_runtime_srcs", ]), ) @@ -1400,13 +1400,13 @@ filegroup( "subprocess.h", "thread_annotations.h", ":base_hdrs", + # copybara:uncomment(GoogleFileSystem) "@local_xla//xla/tsl/platform/google:env.h", "//tensorflow/core/platform/profile_utils:android_armv7a_cpu_utils_helper.h", "//tensorflow/core/platform/profile_utils:clock_cycle_profiler.h", "//tensorflow/core/platform/profile_utils:cpu_utils.h", "//tensorflow/core/platform/profile_utils:i_cpu_utils_helper.h", "@local_tsl//tsl/platform:base_hdrs", "@local_tsl//tsl/platform:lib_hdrs", - # copybara:uncomment(GoogleFileSystem) "@local_tsl//tsl/platform/google:env.h", ], visibility = ["//tensorflow/core:__pkg__"], ) @@ -1669,7 +1669,7 @@ filegroup( "//tensorflow/core/platform/profile_utils:cpu_utils.h", "//tensorflow/core/platform/profile_utils:i_cpu_utils_helper.h", "@local_tsl//tsl/platform:mobile_srcs_only_runtime", - "@local_tsl//tsl/platform/default:mobile_srcs_only_runtime", + "@local_xla//xla/tsl/platform/default:mobile_srcs_only_runtime", ] + if_not_fuchsia([ "subprocess.h", ]) + tf_google_mobile_srcs_only_runtime(), diff --git a/tensorflow/core/platform/build_config_root.bzl b/tensorflow/core/platform/build_config_root.bzl index 744c9eada0d..8c31b76709d 100644 --- a/tensorflow/core/platform/build_config_root.bzl +++ b/tensorflow/core/platform/build_config_root.bzl @@ -1,7 +1,7 @@ """Provides a redirection point for platform specific implementations of starlark utilities.""" load( - "@local_tsl//tsl/platform/default:build_config_root.bzl", + "@local_xla//xla/tsl/platform/default:build_config_root.bzl", _if_llvm_aarch32_available = "if_llvm_aarch32_available", _if_llvm_aarch64_available = "if_llvm_aarch64_available", _if_llvm_arm_available = "if_llvm_arm_available", diff --git a/tensorflow/core/platform/cloud/BUILD b/tensorflow/core/platform/cloud/BUILD index e2b61164265..5604acab304 100644 --- a/tensorflow/core/platform/cloud/BUILD +++ b/tensorflow/core/platform/cloud/BUILD @@ -31,7 +31,7 @@ cc_library( copts = tsl_copts(), deps = [ "//tensorflow/core:lib", - "@local_tsl//tsl/platform/cloud:expiring_lru_cache", + "@local_xla//xla/tsl/platform/cloud:expiring_lru_cache", ], ) @@ -42,7 +42,7 @@ cc_library( deps = [ "//tensorflow/core:lib", "//tensorflow/core/platform:stringpiece", - "@local_tsl//tsl/platform/cloud:file_block_cache", + "@local_xla//xla/tsl/platform/cloud:file_block_cache", ], ) @@ -55,7 +55,7 @@ cc_library( ":file_block_cache", "//tensorflow/core:lib", "//tensorflow/core/platform:stringpiece", - "@local_tsl//tsl/platform/cloud:ram_file_block_cache", + "@local_xla//xla/tsl/platform/cloud:ram_file_block_cache", ], ) @@ -66,7 +66,7 @@ cc_library( deps = [ ":http_request", "//tensorflow/core:lib", - "@local_tsl//tsl/platform/cloud:gcs_dns_cache", + "@local_xla//xla/tsl/platform/cloud:gcs_dns_cache", ], ) @@ -76,7 +76,7 @@ cc_library( copts = tsl_copts(), deps = [ "//tensorflow/core:lib", - "@local_tsl//tsl/platform/cloud:gcs_throttle", + "@local_xla//xla/tsl/platform/cloud:gcs_throttle", ], ) @@ -109,7 +109,7 @@ cc_library( "//tensorflow/core/platform:stringprintf", "//tensorflow/core/profiler/lib:traceme", "@jsoncpp_git//:jsoncpp", - "@local_tsl//tsl/platform/cloud:gcs_file_system", + "@local_xla//xla/tsl/platform/cloud:gcs_file_system", ], alwayslink = 1, ) @@ -146,7 +146,7 @@ cc_library( "//tensorflow/core/platform:stringprintf", "//tensorflow/core/profiler/lib:traceme", "@jsoncpp_git//:jsoncpp", - "@local_tsl//tsl/platform/cloud:gcs_file_system_disabled", + "@local_xla//xla/tsl/platform/cloud:gcs_file_system_disabled", ], alwayslink = 1, ) @@ -163,7 +163,7 @@ cc_library( "//tensorflow/core:framework_headers_lib", "//tensorflow/core:lib_internal", "//tensorflow/core/platform:stringpiece", - "@local_tsl//tsl/platform/cloud:http_request", + "@local_xla//xla/tsl/platform/cloud:http_request", ], ) @@ -180,7 +180,7 @@ cc_library( "//tensorflow/core/platform:stringpiece", "//tensorflow/core/util:env_var", "@curl", - "@local_tsl//tsl/platform/cloud:curl_http_request", + "@local_xla//xla/tsl/platform/cloud:curl_http_request", ], ) @@ -200,7 +200,7 @@ cc_library( "//tensorflow/core/platform:status", "//tensorflow/core/platform:stringpiece", "@curl", - "@local_tsl//tsl/platform/cloud:http_request_fake", + "@local_xla//xla/tsl/platform/cloud:http_request_fake", ], ) @@ -227,7 +227,7 @@ cc_library( "//tensorflow/core/platform:status", "@com_google_absl//absl/strings", "@jsoncpp_git//:jsoncpp", - "@local_tsl//tsl/platform/cloud:google_auth_provider", + "@local_xla//xla/tsl/platform/cloud:google_auth_provider", ], ) @@ -243,7 +243,7 @@ cc_library( "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "//tensorflow/core/platform:retrying_utils", - "@local_tsl//tsl/platform/cloud:compute_engine_metadata_client", + "@local_xla//xla/tsl/platform/cloud:compute_engine_metadata_client", ], ) @@ -261,7 +261,7 @@ cc_library( "//tensorflow/core/platform:errors", "//tensorflow/core/platform:status", "//tensorflow/core/platform:str_util", - "@local_tsl//tsl/platform/cloud:compute_engine_zone_provider", + "@local_xla//xla/tsl/platform/cloud:compute_engine_zone_provider", ], ) @@ -273,7 +273,7 @@ cc_library( deps = [ "//tensorflow/core:lib", "//tensorflow/core:lib_internal", - "@local_tsl//tsl/platform/cloud:now_seconds_env", + "@local_xla//xla/tsl/platform/cloud:now_seconds_env", ], ) @@ -293,7 +293,7 @@ cc_library( "//tensorflow/core/platform:status", "@boringssl//:crypto", "@jsoncpp_git//:jsoncpp", - "@local_tsl//tsl/platform/cloud:oauth_client", + "@local_xla//xla/tsl/platform/cloud:oauth_client", ], ) @@ -306,6 +306,6 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "//tensorflow/core:lib_internal", - "@local_tsl//tsl/platform/cloud:time_util", + "@local_xla//xla/tsl/platform/cloud:time_util", ], ) diff --git a/tensorflow/core/platform/cloud/auth_provider.h b/tensorflow/core/platform/cloud/auth_provider.h index f2c907ccc76..987cc39f4a9 100644 --- a/tensorflow/core/platform/cloud/auth_provider.h +++ b/tensorflow/core/platform/cloud/auth_provider.h @@ -18,9 +18,9 @@ limitations under the License. #include +#include "xla/tsl/platform/cloud/auth_provider.h" #include "tensorflow/core/platform/errors.h" #include "tensorflow/core/platform/status.h" -#include "tsl/platform/cloud/auth_provider.h" namespace tensorflow { // NOLINTBEGIN(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/compute_engine_metadata_client.h b/tensorflow/core/platform/cloud/compute_engine_metadata_client.h index 9cabf8d4bae..4c83d28a0ce 100644 --- a/tensorflow/core/platform/cloud/compute_engine_metadata_client.h +++ b/tensorflow/core/platform/cloud/compute_engine_metadata_client.h @@ -16,10 +16,10 @@ limitations under the License. #ifndef TENSORFLOW_CORE_PLATFORM_CLOUD_COMPUTE_ENGINE_METADATA_CLIENT_H_ #define TENSORFLOW_CORE_PLATFORM_CLOUD_COMPUTE_ENGINE_METADATA_CLIENT_H_ +#include "xla/tsl/platform/cloud/compute_engine_metadata_client.h" #include "tensorflow/core/platform/cloud/http_request.h" #include "tensorflow/core/platform/retrying_utils.h" #include "tensorflow/core/platform/status.h" -#include "tsl/platform/cloud/compute_engine_metadata_client.h" namespace tensorflow { using tsl::ComputeEngineMetadataClient; // NOLINT(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/compute_engine_zone_provider.h b/tensorflow/core/platform/cloud/compute_engine_zone_provider.h index 8f0dfc7107e..6b416481e3d 100644 --- a/tensorflow/core/platform/cloud/compute_engine_zone_provider.h +++ b/tensorflow/core/platform/cloud/compute_engine_zone_provider.h @@ -16,9 +16,9 @@ limitations under the License. #ifndef TENSORFLOW_CORE_PLATFORM_CLOUD_COMPUTE_ENGINE_ZONE_PROVIDER_H_ #define TENSORFLOW_CORE_PLATFORM_CLOUD_COMPUTE_ENGINE_ZONE_PROVIDER_H_ +#include "xla/tsl/platform/cloud/compute_engine_zone_provider.h" #include "tensorflow/core/platform/cloud/compute_engine_metadata_client.h" #include "tensorflow/core/platform/cloud/zone_provider.h" -#include "tsl/platform/cloud/compute_engine_zone_provider.h" namespace tensorflow { using tsl::ComputeEngineZoneProvider; // NOLINT(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/curl_http_request.h b/tensorflow/core/platform/cloud/curl_http_request.h index a9ee27b3fec..385091ff224 100644 --- a/tensorflow/core/platform/cloud/curl_http_request.h +++ b/tensorflow/core/platform/cloud/curl_http_request.h @@ -21,6 +21,7 @@ limitations under the License. #include #include +#include "xla/tsl/platform/cloud/curl_http_request.h" #include "tensorflow/core/platform/cloud/http_request.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/errors.h" @@ -29,7 +30,6 @@ limitations under the License. #include "tensorflow/core/platform/status.h" #include "tensorflow/core/platform/stringpiece.h" #include "tensorflow/core/platform/types.h" -#include "tsl/platform/cloud/curl_http_request.h" namespace tensorflow { // NOLINTBEGIN(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/expiring_lru_cache.h b/tensorflow/core/platform/cloud/expiring_lru_cache.h index 878e95c5536..03af7ee7029 100644 --- a/tensorflow/core/platform/cloud/expiring_lru_cache.h +++ b/tensorflow/core/platform/cloud/expiring_lru_cache.h @@ -21,11 +21,11 @@ limitations under the License. #include #include +#include "xla/tsl/platform/cloud/expiring_lru_cache.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/mutex.h" #include "tensorflow/core/platform/thread_annotations.h" #include "tensorflow/core/platform/types.h" -#include "tsl/platform/cloud/expiring_lru_cache.h" namespace tensorflow { using tsl::ExpiringLRUCache; // NOLINT(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/file_block_cache.h b/tensorflow/core/platform/cloud/file_block_cache.h index e874cf84cc3..4c907437420 100644 --- a/tensorflow/core/platform/cloud/file_block_cache.h +++ b/tensorflow/core/platform/cloud/file_block_cache.h @@ -23,6 +23,7 @@ limitations under the License. #include #include +#include "xla/tsl/platform/cloud/file_block_cache.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/mutex.h" #include "tensorflow/core/platform/notification.h" @@ -30,7 +31,6 @@ limitations under the License. #include "tensorflow/core/platform/stringpiece.h" #include "tensorflow/core/platform/thread_annotations.h" #include "tensorflow/core/platform/types.h" -#include "tsl/platform/cloud/file_block_cache.h" namespace tensorflow { // NOLINTBEGIN(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/gcs_file_system.h b/tensorflow/core/platform/cloud/gcs_file_system.h index ba1b09a1623..5545d2b21f9 100644 --- a/tensorflow/core/platform/cloud/gcs_file_system.h +++ b/tensorflow/core/platform/cloud/gcs_file_system.h @@ -21,6 +21,7 @@ limitations under the License. #include #include +#include "xla/tsl/platform/cloud/gcs_file_system.h" #include "tensorflow/core/platform/cloud/auth_provider.h" #include "tensorflow/core/platform/cloud/compute_engine_metadata_client.h" #include "tensorflow/core/platform/cloud/compute_engine_zone_provider.h" @@ -32,7 +33,6 @@ limitations under the License. #include "tensorflow/core/platform/file_system.h" #include "tensorflow/core/platform/retrying_file_system.h" #include "tensorflow/core/platform/status.h" -#include "tsl/platform/cloud/gcs_file_system.h" namespace tensorflow { // NOLINTBEGIN(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/gcs_throttle.h b/tensorflow/core/platform/cloud/gcs_throttle.h index b3cc2fbebfe..e4a33a383f0 100644 --- a/tensorflow/core/platform/cloud/gcs_throttle.h +++ b/tensorflow/core/platform/cloud/gcs_throttle.h @@ -16,8 +16,8 @@ limitations under the License. #ifndef TENSORFLOW_CORE_PLATFORM_CLOUD_GCS_THROTTLE_H_ #define TENSORFLOW_CORE_PLATFORM_CLOUD_GCS_THROTTLE_H_ +#include "xla/tsl/platform/cloud/gcs_throttle.h" #include "tensorflow/core/platform/env.h" -#include "tsl/platform/cloud/gcs_throttle.h" namespace tensorflow { // NOLINTBEGIN(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/google_auth_provider.h b/tensorflow/core/platform/cloud/google_auth_provider.h index b71fa947128..afefb308fb0 100644 --- a/tensorflow/core/platform/cloud/google_auth_provider.h +++ b/tensorflow/core/platform/cloud/google_auth_provider.h @@ -18,12 +18,12 @@ limitations under the License. #include +#include "xla/tsl/platform/cloud/google_auth_provider.h" #include "tensorflow/core/platform/cloud/auth_provider.h" #include "tensorflow/core/platform/cloud/compute_engine_metadata_client.h" #include "tensorflow/core/platform/cloud/oauth_client.h" #include "tensorflow/core/platform/mutex.h" #include "tensorflow/core/platform/thread_annotations.h" -#include "tsl/platform/cloud/google_auth_provider.h" namespace tensorflow { using tsl::GoogleAuthProvider; // NOLINT(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/http_request.h b/tensorflow/core/platform/cloud/http_request.h index bf5cf4433e8..aae023b5f50 100644 --- a/tensorflow/core/platform/cloud/http_request.h +++ b/tensorflow/core/platform/cloud/http_request.h @@ -20,6 +20,7 @@ limitations under the License. #include #include +#include "xla/tsl/platform/cloud/http_request.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/errors.h" #include "tensorflow/core/platform/macros.h" @@ -27,7 +28,6 @@ limitations under the License. #include "tensorflow/core/platform/status.h" #include "tensorflow/core/platform/stringpiece.h" #include "tensorflow/core/platform/types.h" -#include "tsl/platform/cloud/http_request.h" namespace tensorflow { using tsl::HttpRequest; // NOLINT(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/http_request_fake.h b/tensorflow/core/platform/cloud/http_request_fake.h index 7c57ac5a74f..de1177ec1e7 100644 --- a/tensorflow/core/platform/cloud/http_request_fake.h +++ b/tensorflow/core/platform/cloud/http_request_fake.h @@ -22,6 +22,7 @@ limitations under the License. #include #include +#include "xla/tsl/platform/cloud/http_request_fake.h" #include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/platform/cloud/curl_http_request.h" #include "tensorflow/core/platform/errors.h" @@ -31,7 +32,6 @@ limitations under the License. #include "tensorflow/core/platform/stringpiece.h" #include "tensorflow/core/platform/test.h" #include "tensorflow/core/platform/types.h" -#include "tsl/platform/cloud/http_request_fake.h" namespace tensorflow { // NOLINTBEGIN(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/now_seconds_env.h b/tensorflow/core/platform/cloud/now_seconds_env.h index d1136218e70..395e563c90e 100644 --- a/tensorflow/core/platform/cloud/now_seconds_env.h +++ b/tensorflow/core/platform/cloud/now_seconds_env.h @@ -16,10 +16,10 @@ limitations under the License. #ifndef TENSORFLOW_CORE_PLATFORM_CLOUD_NOW_SECONDS_ENV_H_ #define TENSORFLOW_CORE_PLATFORM_CLOUD_NOW_SECONDS_ENV_H_ +#include "xla/tsl/platform/cloud/now_seconds_env.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/mutex.h" #include "tensorflow/core/platform/types.h" -#include "tsl/platform/cloud/now_seconds_env.h" namespace tensorflow { using tsl::NowSecondsEnv; // NOLINT(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/oauth_client.h b/tensorflow/core/platform/cloud/oauth_client.h index 077d47c935a..ca390c9f102 100644 --- a/tensorflow/core/platform/cloud/oauth_client.h +++ b/tensorflow/core/platform/cloud/oauth_client.h @@ -19,10 +19,10 @@ limitations under the License. #include #include "json/json.h" +#include "xla/tsl/platform/cloud/oauth_client.h" #include "tensorflow/core/platform/cloud/http_request.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/status.h" -#include "tsl/platform/cloud/oauth_client.h" namespace tensorflow { using tsl::OAuthClient; // NOLINT(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/ram_file_block_cache.h b/tensorflow/core/platform/cloud/ram_file_block_cache.h index 40941b31605..d4de2b427cd 100644 --- a/tensorflow/core/platform/cloud/ram_file_block_cache.h +++ b/tensorflow/core/platform/cloud/ram_file_block_cache.h @@ -23,6 +23,7 @@ limitations under the License. #include #include +#include "xla/tsl/platform/cloud/ram_file_block_cache.h" #include "tensorflow/core/platform/cloud/file_block_cache.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/mutex.h" @@ -31,7 +32,6 @@ limitations under the License. #include "tensorflow/core/platform/stringpiece.h" #include "tensorflow/core/platform/thread_annotations.h" #include "tensorflow/core/platform/types.h" -#include "tsl/platform/cloud/ram_file_block_cache.h" namespace tensorflow { using tsl::RamFileBlockCache; // NOLINT(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/time_util.h b/tensorflow/core/platform/cloud/time_util.h index 3fef0a74cab..7110d13c2c1 100644 --- a/tensorflow/core/platform/cloud/time_util.h +++ b/tensorflow/core/platform/cloud/time_util.h @@ -16,8 +16,8 @@ limitations under the License. #ifndef TENSORFLOW_CORE_PLATFORM_CLOUD_TIME_UTIL_H_ #define TENSORFLOW_CORE_PLATFORM_CLOUD_TIME_UTIL_H_ +#include "xla/tsl/platform/cloud/time_util.h" #include "tensorflow/core/platform/status.h" -#include "tsl/platform/cloud/time_util.h" namespace tensorflow { using tsl::ParseRfc3339Time; // NOLINT(misc-unused-using-decls) diff --git a/tensorflow/core/platform/cloud/zone_provider.h b/tensorflow/core/platform/cloud/zone_provider.h index e96784da048..07ef0609a52 100644 --- a/tensorflow/core/platform/cloud/zone_provider.h +++ b/tensorflow/core/platform/cloud/zone_provider.h @@ -18,9 +18,9 @@ limitations under the License. #include +#include "xla/tsl/platform/cloud/zone_provider.h" #include "tensorflow/core/platform/errors.h" #include "tensorflow/core/platform/status.h" -#include "tsl/platform/cloud/zone_provider.h" namespace tensorflow { using tsl::ZoneProvider; // NOLINT(misc-unused-using-decls) diff --git a/tensorflow/core/platform/rules_cc.bzl b/tensorflow/core/platform/rules_cc.bzl index 633dcde5060..7a2e6f1caf3 100644 --- a/tensorflow/core/platform/rules_cc.bzl +++ b/tensorflow/core/platform/rules_cc.bzl @@ -1,7 +1,7 @@ """Provides an indirection layer to bazel cc_rules""" load( - "@local_tsl//tsl/platform/default:rules_cc.bzl", + "@local_xla//xla/tsl/platform/default:rules_cc.bzl", _cc_binary = "cc_binary", _cc_import = "cc_import", _cc_library = "cc_library", diff --git a/tensorflow/core/platform/tracing.h b/tensorflow/core/platform/tracing.h index e7413e34cfd..24917a6de67 100644 --- a/tensorflow/core/platform/tracing.h +++ b/tensorflow/core/platform/tracing.h @@ -45,9 +45,9 @@ using tsl::tracing::SetEventCollector; } // namespace tensorflow #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/tracing_impl.h" +#include "xla/tsl/platform/google/tracing_impl.h" #else -#include "tsl/platform/default/tracing_impl.h" +#include "xla/tsl/platform/default/tracing_impl.h" #endif #endif // TENSORFLOW_CORE_PLATFORM_TRACING_H_ diff --git a/tensorflow/core/profiler/backends/gpu/BUILD b/tensorflow/core/profiler/backends/gpu/BUILD index 8c082a82dcd..012aa83e6ae 100644 --- a/tensorflow/core/profiler/backends/gpu/BUILD +++ b/tensorflow/core/profiler/backends/gpu/BUILD @@ -1,5 +1,5 @@ load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured", ) load("//tensorflow:tensorflow.default.bzl", "tf_cuda_cc_test") diff --git a/tensorflow/lite/acceleration/configuration/BUILD b/tensorflow/lite/acceleration/configuration/BUILD index a8e13de931c..1aa500ea327 100644 --- a/tensorflow/lite/acceleration/configuration/BUILD +++ b/tensorflow/lite/acceleration/configuration/BUILD @@ -18,7 +18,7 @@ load("@flatbuffers//:build_defs.bzl", "DEFAULT_FLATC_ARGS", "flatbuffer_android_library", "flatbuffer_cc_library", "flatbuffer_java_library", "flatc_path") # copybara:comment_begin(oss-only) -load("@local_tsl//tsl/platform/default:build_config.bzl", "tf_proto_library_py") +load("@local_xla//xla/tsl/platform/default:build_config.bzl", "tf_proto_library_py") # copybara:comment_end load("//tensorflow:tensorflow.default.bzl", "get_compatible_with_portable") diff --git a/tensorflow/lite/experimental/acceleration/configuration/BUILD b/tensorflow/lite/experimental/acceleration/configuration/BUILD index f4bcbb9616c..9e780629b9c 100644 --- a/tensorflow/lite/experimental/acceleration/configuration/BUILD +++ b/tensorflow/lite/experimental/acceleration/configuration/BUILD @@ -18,7 +18,7 @@ load("@flatbuffers//:build_defs.bzl", "DEFAULT_FLATC_ARGS", "flatbuffer_android_library", "flatbuffer_cc_library", "flatbuffer_java_library") # copybara:comment_begin(oss-only) -load("@local_tsl//tsl/platform/default:build_config.bzl", "tf_proto_library_py") +load("@local_xla//xla/tsl/platform/default:build_config.bzl", "tf_proto_library_py") # copybara:comment_end load("//tensorflow:tensorflow.default.bzl", "get_compatible_with_portable") diff --git a/tensorflow/lite/kernels/CMakeLists.txt b/tensorflow/lite/kernels/CMakeLists.txt index b63f7f5b6cc..baca8ca6659 100644 --- a/tensorflow/lite/kernels/CMakeLists.txt +++ b/tensorflow/lite/kernels/CMakeLists.txt @@ -95,9 +95,9 @@ set(TEST_FRAMEWORK_SRC ${TFLITE_SOURCE_DIR}/tools/optimize/quantization_utils.cc ${TFLITE_SOURCE_DIR}/tools/tool_params.cc ${TFLITE_SOURCE_DIR}/tools/versioning/op_version.cc - ${TSL_SOURCE_DIR}/tsl/platform/default/env_time.cc - ${TSL_SOURCE_DIR}/tsl/platform/default/logging.cc - ${TSL_SOURCE_DIR}/tsl/platform/default/mutex.cc + ${XLA_SOURCE_DIR}/xla/tsl/platform/default/env_time.cc + ${XLA_SOURCE_DIR}/xla/tsl/platform/default/logging.cc + ${XLA_SOURCE_DIR}/xla/tsl/platform/default/mutex.cc internal/test_util.cc acceleration_test_util.cc acceleration_test_util_internal.cc diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD index f5b5a8457cb..57a53f1c96b 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -3,7 +3,7 @@ # ":platform" - Low-level and platform-specific Python code. load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured", ) load("//tensorflow:pytype.default.bzl", "pytype_strict_library") diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl index b7243071e88..8ab1e9ea9a4 100644 --- a/third_party/gpus/cuda_configure.bzl +++ b/third_party/gpus/cuda_configure.bzl @@ -710,7 +710,7 @@ filegroup(name="cudnn-include") ) # Create dummy files for the CUDA toolkit since they are still required by - # tensorflow/tsl/platform/default/build_config:cuda. + # tensorflow/compiler/xla/tsl/platform/default/build_config:cuda. repository_ctx.file("cuda/cuda/include/cuda.h") repository_ctx.file("cuda/cuda/include/cublas.h") repository_ctx.file("cuda/cuda/include/cudnn.h") diff --git a/third_party/nccl/system.BUILD.tpl b/third_party/nccl/system.BUILD.tpl index 6e2a22a950b..8a0827fb9e1 100644 --- a/third_party/nccl/system.BUILD.tpl +++ b/third_party/nccl/system.BUILD.tpl @@ -1,6 +1,6 @@ load("@bazel_skylib//rules:write_file.bzl", "write_file") load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", "cuda_rpath_flags" ) diff --git a/third_party/pprof.BUILD b/third_party/pprof.BUILD index ba25846c709..45d15e5eb0e 100644 --- a/third_party/pprof.BUILD +++ b/third_party/pprof.BUILD @@ -1,4 +1,4 @@ -load("@local_tsl//tsl/platform/default:build_config.bzl", "py_proto_library") +load("@local_xla//xla/tsl/platform/default:build_config.bzl", "py_proto_library") package( default_visibility = ["//visibility:public"], diff --git a/third_party/riegeli_fix.patch b/third_party/riegeli_fix.patch index a8fe8de8760..ac9d5e4f25f 100644 --- a/third_party/riegeli_fix.patch +++ b/third_party/riegeli_fix.patch @@ -7,7 +7,7 @@ index cde6d546..7fe18a93 100644 +++ b/python/riegeli/records/BUILD @@ -1,5 +1,5 @@ -load("@com_google_protobuf//:protobuf.bzl", "py_proto_library") -+load("@local_tsl//tsl/platform/default:build_config.bzl", "py_proto_library") ++load("@local_xla//xla/tsl/platform/default:build_config.bzl", "py_proto_library") load("//python/riegeli:py_extension.bzl", "py_extension") package( diff --git a/third_party/xla/third_party/tsl/third_party/gpus/cuda_configure.bzl b/third_party/xla/third_party/tsl/third_party/gpus/cuda_configure.bzl index b7243071e88..8ab1e9ea9a4 100644 --- a/third_party/xla/third_party/tsl/third_party/gpus/cuda_configure.bzl +++ b/third_party/xla/third_party/tsl/third_party/gpus/cuda_configure.bzl @@ -710,7 +710,7 @@ filegroup(name="cudnn-include") ) # Create dummy files for the CUDA toolkit since they are still required by - # tensorflow/tsl/platform/default/build_config:cuda. + # tensorflow/compiler/xla/tsl/platform/default/build_config:cuda. repository_ctx.file("cuda/cuda/include/cuda.h") repository_ctx.file("cuda/cuda/include/cublas.h") repository_ctx.file("cuda/cuda/include/cudnn.h") diff --git a/third_party/xla/third_party/tsl/third_party/nccl/system.BUILD.tpl b/third_party/xla/third_party/tsl/third_party/nccl/system.BUILD.tpl index 6e2a22a950b..8a0827fb9e1 100644 --- a/third_party/xla/third_party/tsl/third_party/nccl/system.BUILD.tpl +++ b/third_party/xla/third_party/tsl/third_party/nccl/system.BUILD.tpl @@ -1,6 +1,6 @@ load("@bazel_skylib//rules:write_file.bzl", "write_file") load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", "cuda_rpath_flags" ) diff --git a/third_party/xla/third_party/tsl/tsl/platform/BUILD b/third_party/xla/third_party/tsl/tsl/platform/BUILD index 0da12b95d46..ce8ef5ca5d6 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/BUILD +++ b/third_party/xla/third_party/tsl/tsl/platform/BUILD @@ -55,6 +55,7 @@ exports_files( visibility = internal_visibility([ "//tensorflow/core/platform:__subpackages__", "//tsl:__subpackages__", + "@local_xla//xla/tsl:__subpackages__", ]), ) @@ -619,7 +620,7 @@ filegroup( "//conditions:default": [ "file_system_helper.cc", "tracing.cc", - "//tsl/platform/default:mobile_srcs_no_runtime", + "@local_xla//xla/tsl/platform/default:mobile_srcs_no_runtime", ], }), compatible_with = get_compatible_with_portable(), diff --git a/third_party/xla/third_party/tsl/tsl/platform/build_config.bzl b/third_party/xla/third_party/tsl/tsl/platform/build_config.bzl index 4a22f84baf1..b4f590dc6c6 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/build_config.bzl +++ b/third_party/xla/third_party/tsl/tsl/platform/build_config.bzl @@ -1,7 +1,7 @@ """Provides a redirection point for platform specific implementations of starlark utilities.""" load( - "//tsl/platform/default:build_config.bzl", + "@local_xla//xla/tsl/platform/default:build_config.bzl", _pyx_library = "pyx_library", _tf_additional_all_protos = "tf_additional_all_protos", _tf_additional_core_deps = "tf_additional_core_deps", diff --git a/third_party/xla/third_party/tsl/tsl/platform/build_config_root.bzl b/third_party/xla/third_party/tsl/tsl/platform/build_config_root.bzl index fd87c70d761..62e8cd81f4a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/build_config_root.bzl +++ b/third_party/xla/third_party/tsl/tsl/platform/build_config_root.bzl @@ -1,7 +1,7 @@ """Provides a redirection point for platform specific implementations of starlark utilities.""" load( - "//tsl/platform/default:build_config_root.bzl", + "@local_xla//xla/tsl/platform/default:build_config_root.bzl", _if_llvm_aarch32_available = "if_llvm_aarch32_available", _if_llvm_aarch64_available = "if_llvm_aarch64_available", _if_llvm_arm_available = "if_llvm_arm_available", diff --git a/third_party/xla/third_party/tsl/tsl/platform/casts.h b/third_party/xla/third_party/tsl/tsl/platform/casts.h index c1253123b37..8ec9f78e8a8 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/casts.h +++ b/third_party/xla/third_party/tsl/tsl/platform/casts.h @@ -19,11 +19,11 @@ limitations under the License. #include "tsl/platform/platform.h" #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/casts.h" // IWYU pragma: export +#include "xla/tsl/platform/google/casts.h" // IWYU pragma: export #elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \ defined(PLATFORM_GOOGLE_ANDROID) || defined(PLATFORM_POSIX_IOS) || \ defined(PLATFORM_GOOGLE_IOS) || defined(PLATFORM_WINDOWS) -#include "tsl/platform/default/casts.h" // IWYU pragma: export +#include "xla/tsl/platform/default/casts.h" // IWYU pragma: export #else #error Define the appropriate PLATFORM_ macro for this platform #endif diff --git a/third_party/xla/third_party/tsl/tsl/platform/context.h b/third_party/xla/third_party/tsl/tsl/platform/context.h index 045a2dca1df..525436757c8 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/context.h +++ b/third_party/xla/third_party/tsl/tsl/platform/context.h @@ -39,9 +39,9 @@ class WithContext; } // namespace tsl #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/context.h" // IWYU pragma: export +#include "xla/tsl/platform/google/context.h" // IWYU pragma: export #else -#include "tsl/platform/default/context.h" // IWYU pragma: export +#include "xla/tsl/platform/default/context.h" // IWYU pragma: export #endif #endif // TENSORFLOW_TSL_PLATFORM_CONTEXT_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/crash_analysis.h b/third_party/xla/third_party/tsl/tsl/platform/crash_analysis.h index 64825ff83f1..e0926f7ecb6 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/crash_analysis.h +++ b/third_party/xla/third_party/tsl/tsl/platform/crash_analysis.h @@ -20,9 +20,9 @@ limitations under the License. // Include appropriate platform-dependent implementations #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/crash_analysis.h" // IWYU pragma: export +#include "xla/tsl/platform/google/crash_analysis.h" // IWYU pragma: export #else -#include "tsl/platform/default/crash_analysis.h" // IWYU pragma: export +#include "xla/tsl/platform/default/crash_analysis.h" // IWYU pragma: export #endif #endif // TENSORFLOW_TSL_PLATFORM_CRASH_ANALYSIS_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/criticality.h b/third_party/xla/third_party/tsl/tsl/platform/criticality.h index 2f05dcef4c0..722c8135954 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/criticality.h +++ b/third_party/xla/third_party/tsl/tsl/platform/criticality.h @@ -42,9 +42,9 @@ enum class Criticality { } // namespace tsl #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/criticality.h" // IWYU pragma: export +#include "xla/tsl/platform/google/criticality.h" // IWYU pragma: export #else -#include "tsl/platform/default/criticality.h" // IWYU pragma: export +#include "xla/tsl/platform/default/criticality.h" // IWYU pragma: export #endif #endif // TENSORFLOW_TSL_PLATFORM_CRITICALITY_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/dso_loader.h b/third_party/xla/third_party/tsl/tsl/platform/dso_loader.h index 5aa1f9e430d..b10a5f4eef6 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/dso_loader.h +++ b/third_party/xla/third_party/tsl/tsl/platform/dso_loader.h @@ -20,10 +20,10 @@ limitations under the License. // Include appropriate platform-dependent implementations #if defined(PLATFORM_GOOGLE) || defined(PLATFORM_CHROMIUMOS) -#include "tsl/platform/google/dso_loader.h" +#include "xla/tsl/platform/google/dso_loader.h" #elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \ defined(PLATFORM_GOOGLE_ANDROID) || defined(PLATFORM_WINDOWS) -#include "tsl/platform/default/dso_loader.h" +#include "xla/tsl/platform/default/dso_loader.h" #else #error Define the appropriate PLATFORM_ macro for this platform #endif diff --git a/third_party/xla/third_party/tsl/tsl/platform/env.cc b/third_party/xla/third_party/tsl/tsl/platform/env.cc index c1e163b669e..0945a773c78 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/env.cc +++ b/third_party/xla/third_party/tsl/tsl/platform/env.cc @@ -39,7 +39,7 @@ limitations under the License. #include #undef DeleteFile #undef CopyFile -#include "tsl/platform/windows/wide_char.h" +#include "xla/tsl/platform/windows/wide_char.h" #define PATH_MAX MAX_PATH #else #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/logging.h b/third_party/xla/third_party/tsl/tsl/platform/logging.h index f60bea4a3d6..93939888230 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/logging.h +++ b/third_party/xla/third_party/tsl/tsl/platform/logging.h @@ -21,9 +21,9 @@ limitations under the License. #if defined(PLATFORM_GOOGLE) || defined(PLATFORM_GOOGLE_ANDROID) || \ defined(PLATFORM_GOOGLE_IOS) || defined(GOOGLE_LOGGING) || \ defined(__EMSCRIPTEN__) || defined(PLATFORM_CHROMIUMOS) -#include "tsl/platform/google/logging.h" // IWYU pragma: export +#include "xla/tsl/platform/google/logging.h" // IWYU pragma: export #else -#include "tsl/platform/default/logging.h" // IWYU pragma: export +#include "xla/tsl/platform/default/logging.h" // IWYU pragma: export #endif #endif // TENSORFLOW_TSL_PLATFORM_LOGGING_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/mutex.h b/third_party/xla/third_party/tsl/tsl/platform/mutex.h index c5effd9e9ef..4271dbee73a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/mutex.h +++ b/third_party/xla/third_party/tsl/tsl/platform/mutex.h @@ -27,11 +27,11 @@ limitations under the License. // Include appropriate platform-dependent implementation details of mutex etc. #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/mutex_data.h" +#include "xla/tsl/platform/google/mutex_data.h" #elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \ defined(PLATFORM_GOOGLE_ANDROID) || defined(PLATFORM_POSIX_IOS) || \ defined(PLATFORM_GOOGLE_IOS) || defined(PLATFORM_WINDOWS) -#include "tsl/platform/default/mutex_data.h" +#include "xla/tsl/platform/default/mutex_data.h" #else #error Define the appropriate PLATFORM_ macro for this platform #endif @@ -322,11 +322,11 @@ inline Condition::Condition(const bool* flag) // Include appropriate platform-dependent implementation details of mutex etc. #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/mutex.h" +#include "xla/tsl/platform/google/mutex.h" #elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \ defined(PLATFORM_GOOGLE_ANDROID) || defined(PLATFORM_POSIX_IOS) || \ defined(PLATFORM_GOOGLE_IOS) || defined(PLATFORM_WINDOWS) -#include "tsl/platform/default/mutex.h" +#include "xla/tsl/platform/default/mutex.h" #else #error Define the appropriate PLATFORM_ macro for this platform #endif diff --git a/third_party/xla/third_party/tsl/tsl/platform/profile_utils/BUILD b/third_party/xla/third_party/tsl/tsl/platform/profile_utils/BUILD index 180662871a8..5c385c25e1c 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/profile_utils/BUILD +++ b/third_party/xla/third_party/tsl/tsl/platform/profile_utils/BUILD @@ -14,7 +14,7 @@ package( "@local_xla//xla/stream_executor:__subpackages__", "//tensorflow/core/platform:__subpackages__", "//tsl:__pkg__", - "//tsl/platform/default:__pkg__", + "@local_xla//xla/tsl/platform/default:__pkg__", ]), licenses = ["notice"], ) diff --git a/third_party/xla/third_party/tsl/tsl/platform/rules_cc.bzl b/third_party/xla/third_party/tsl/tsl/platform/rules_cc.bzl index 82f979bf996..7a2e6f1caf3 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/rules_cc.bzl +++ b/third_party/xla/third_party/tsl/tsl/platform/rules_cc.bzl @@ -1,7 +1,7 @@ """Provides an indirection layer to bazel cc_rules""" load( - "//tsl/platform/default:rules_cc.bzl", + "@local_xla//xla/tsl/platform/default:rules_cc.bzl", _cc_binary = "cc_binary", _cc_import = "cc_import", _cc_library = "cc_library", diff --git a/third_party/xla/third_party/tsl/tsl/platform/stacktrace.h b/third_party/xla/third_party/tsl/tsl/platform/stacktrace.h index 4a00a6830b3..b4f4f4a0e0f 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/stacktrace.h +++ b/third_party/xla/third_party/tsl/tsl/platform/stacktrace.h @@ -20,13 +20,13 @@ limitations under the License. // Include appropriate platform-dependent implementation. #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/stacktrace.h" // IWYU pragma: export +#include "xla/tsl/platform/google/stacktrace.h" // IWYU pragma: export #elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \ defined(PLATFORM_GOOGLE_ANDROID) || defined(PLATFORM_POSIX_IOS) || \ defined(PLATFORM_GOOGLE_IOS) -#include "tsl/platform/default/stacktrace.h" // IWYU pragma: export +#include "xla/tsl/platform/default/stacktrace.h" // IWYU pragma: export #elif defined(PLATFORM_WINDOWS) -#include "tsl/platform/windows/stacktrace.h" // IWYU pragma: export +#include "xla/tsl/platform/windows/stacktrace.h" // IWYU pragma: export #else #error Define the appropriate PLATFORM_ macro for this platform #endif diff --git a/third_party/xla/third_party/tsl/tsl/platform/status.h b/third_party/xla/third_party/tsl/tsl/platform/status.h index 6fbbf53a851..61238a13f5c 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/status.h +++ b/third_party/xla/third_party/tsl/tsl/platform/status.h @@ -41,9 +41,9 @@ limitations under the License. // Include appropriate platform-dependent parts of status. #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/status.h" // IWYU pragma: export +#include "xla/tsl/platform/google/status.h" // IWYU pragma: export #else -#include "tsl/platform/default/status.h" // IWYU pragma: export +#include "xla/tsl/platform/default/status.h" // IWYU pragma: export #endif // TODO: b/323943471 - This macro should eventually be provided by Abseil. diff --git a/third_party/xla/third_party/tsl/tsl/platform/statusor.h b/third_party/xla/third_party/tsl/tsl/platform/statusor.h index 6c49be5132f..ac27ede3133 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/statusor.h +++ b/third_party/xla/third_party/tsl/tsl/platform/statusor.h @@ -78,9 +78,9 @@ limitations under the License. // Include appropriate platform-dependent `TF_ASSIGN_OR_RETURN`. #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/statusor.h" // IWYU pragma: export +#include "xla/tsl/platform/google/statusor.h" // IWYU pragma: export #else -#include "tsl/platform/default/statusor.h" // IWYU pragma: export +#include "xla/tsl/platform/default/statusor.h" // IWYU pragma: export #endif // TODO: b/323943471 - This macro should eventually be provided by Abseil. diff --git a/third_party/xla/third_party/tsl/tsl/platform/subprocess.h b/third_party/xla/third_party/tsl/tsl/platform/subprocess.h index 0fe905c2f86..8d3acce1296 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/subprocess.h +++ b/third_party/xla/third_party/tsl/tsl/platform/subprocess.h @@ -59,13 +59,13 @@ std::unique_ptr CreateSubProcess(const std::vector& argv); #include "tsl/platform/platform.h" #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/subprocess.h" +#include "xla/tsl/platform/google/subprocess.h" #elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \ defined(PLATFORM_GOOGLE_ANDROID) || defined(PLATFORM_POSIX_IOS) || \ defined(PLATFORM_GOOGLE_IOS) -#include "tsl/platform/default/subprocess.h" // IWYU pragma: export +#include "xla/tsl/platform/default/subprocess.h" // IWYU pragma: export #elif defined(PLATFORM_WINDOWS) -#include "tsl/platform/windows/subprocess.h" // IWYU pragma: export +#include "xla/tsl/platform/windows/subprocess.h" // IWYU pragma: export #else #error Define the appropriate PLATFORM_ macro for this platform #endif diff --git a/third_party/xla/third_party/tsl/tsl/platform/tracing.h b/third_party/xla/third_party/tsl/tsl/platform/tracing.h index 51268eb7134..8541c2bf77f 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/tracing.h +++ b/third_party/xla/third_party/tsl/tsl/platform/tracing.h @@ -142,9 +142,9 @@ const char* GetLogDir(); } // namespace tsl #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/tracing_impl.h" +#include "xla/tsl/platform/google/tracing_impl.h" #else -#include "tsl/platform/default/tracing_impl.h" +#include "xla/tsl/platform/default/tracing_impl.h" #endif #endif // TENSORFLOW_TSL_PLATFORM_TRACING_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/types.h b/third_party/xla/third_party/tsl/tsl/platform/types.h index b480feff5b1..1768d57bb7e 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/types.h +++ b/third_party/xla/third_party/tsl/tsl/platform/types.h @@ -25,11 +25,11 @@ limitations under the License. // Include appropriate platform-dependent implementations #if defined(PLATFORM_GOOGLE) || defined(GOOGLE_INTEGRAL_TYPES) -#include "tsl/platform/google/integral_types.h" // IWYU pragma: export +#include "xla/tsl/platform/google/integral_types.h" // IWYU pragma: export #elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \ defined(PLATFORM_GOOGLE_ANDROID) || defined(PLATFORM_POSIX_IOS) || \ defined(PLATFORM_GOOGLE_IOS) || defined(PLATFORM_WINDOWS) -#include "tsl/platform/default/integral_types.h" // IWYU pragma: export +#include "xla/tsl/platform/default/integral_types.h" // IWYU pragma: export #else #error Define the appropriate PLATFORM_ macro for this platform #endif diff --git a/third_party/xla/third_party/tsl/tsl/platform/unbounded_work_queue.h b/third_party/xla/third_party/tsl/tsl/platform/unbounded_work_queue.h index 6432daf7d02..d4d8537e90a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/unbounded_work_queue.h +++ b/third_party/xla/third_party/tsl/tsl/platform/unbounded_work_queue.h @@ -22,11 +22,11 @@ limitations under the License. // whose size automatically increases with demand. #if defined(PLATFORM_GOOGLE) -#include "tsl/platform/google/unbounded_work_queue.h" // IWYU pragma: export +#include "xla/tsl/platform/google/unbounded_work_queue.h" // IWYU pragma: export #elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \ defined(PLATFORM_GOOGLE_ANDROID) || defined(PLATFORM_POSIX_IOS) || \ defined(PLATFORM_GOOGLE_IOS) || defined(PLATFORM_WINDOWS) -#include "tsl/platform/default/unbounded_work_queue.h" // IWYU pragma: export +#include "xla/tsl/platform/default/unbounded_work_queue.h" // IWYU pragma: export #else #error Define the appropriate PLATFORM_ macro for this platform #endif diff --git a/third_party/xla/third_party/tsl/tsl/profiler/lib/BUILD b/third_party/xla/third_party/tsl/tsl/profiler/lib/BUILD index b68d8b55302..0f8f9525070 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/lib/BUILD +++ b/third_party/xla/third_party/tsl/tsl/profiler/lib/BUILD @@ -1,6 +1,10 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("@local_xla//xla/tsl:tsl.bzl", "if_not_android", "if_oss", "internal_visibility", "nvtx_headers") load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") +load( + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) load( "@local_xla//xla/tsl/profiler/builds:build_config.bzl", "tf_profiler_copts", @@ -8,10 +12,6 @@ load( ) load("//tsl/platform:build_config.bzl", "tsl_cc_test") load("//tsl/platform:build_config_root.bzl", "if_static") -load( - "//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) # copybara:uncomment package(default_applicable_licenses = ["//tensorflow:license"]) diff --git a/third_party/xla/xla/BUILD b/third_party/xla/xla/BUILD index 2d02a8ef76c..93d6216c31f 100644 --- a/third_party/xla/xla/BUILD +++ b/third_party/xla/xla/BUILD @@ -1363,8 +1363,8 @@ bzl_library( srcs = ["lit.bzl"], deps = [ "//xla/tsl:tsl_bzl", + "//xla/tsl/platform/default:cuda_build_defs_bzl", "@bazel_skylib//lib:paths", - "@local_tsl//tsl/platform/default:cuda_build_defs_bzl", ], ) diff --git a/third_party/xla/xla/backends/profiler/gpu/BUILD b/third_party/xla/xla/backends/profiler/gpu/BUILD index 7388360ffd0..80db8e25eb9 100644 --- a/third_party/xla/xla/backends/profiler/gpu/BUILD +++ b/third_party/xla/xla/backends/profiler/gpu/BUILD @@ -4,10 +4,6 @@ load( "@local_tsl//tsl/platform:build_config.bzl", "tf_additional_device_tracer_srcs", ) -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla/tests:build_defs.bzl", "xla_test") load( "//xla/tsl:tsl.bzl", @@ -17,6 +13,10 @@ load( "tsl_copts", "tsl_gpu_library", ) +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) load("//xla/tsl/profiler/builds:build_config.bzl", "tf_profiler_copts") package( diff --git a/third_party/xla/xla/hlo/pass/BUILD b/third_party/xla/xla/hlo/pass/BUILD index dac07866f4a..188ec3e4304 100644 --- a/third_party/xla/xla/hlo/pass/BUILD +++ b/third_party/xla/xla/hlo/pass/BUILD @@ -2,12 +2,12 @@ # XLA’s HLO Intermediate Representation implementation. load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:xla.bzl", "xla_cc_test") load("//xla/tsl:tsl.bzl", "internal_visibility") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/hlo/testlib/BUILD b/third_party/xla/xla/hlo/testlib/BUILD index 0bc189042cd..6529446c4bd 100644 --- a/third_party/xla/xla/hlo/testlib/BUILD +++ b/third_party/xla/xla/hlo/testlib/BUILD @@ -6,13 +6,13 @@ load( "if_rocm_is_configured", ) load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:package_groups.bzl", "xla_tests_package_groups") load("//xla/tsl:tsl.bzl", "internal_visibility") load("//xla/tsl:tsl.default.bzl", "filegroup") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/hlo/transforms/BUILD b/third_party/xla/xla/hlo/transforms/BUILD index 3571159741c..72b52444765 100644 --- a/third_party/xla/xla/hlo/transforms/BUILD +++ b/third_party/xla/xla/hlo/transforms/BUILD @@ -2,12 +2,12 @@ # Implementation of XLA’s HLO transformations. load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:xla.bzl", "xla_cc_test") load("//xla/tsl:tsl.bzl", "tsl_copts") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/lit.bzl b/third_party/xla/xla/lit.bzl index 5ac1cde98f1..c101d710b8a 100644 --- a/third_party/xla/xla/lit.bzl +++ b/third_party/xla/xla/lit.bzl @@ -1,8 +1,8 @@ """Helper rules for writing LIT tests.""" load("@bazel_skylib//lib:paths.bzl", "paths") -load("@local_tsl//tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") load("//xla/tsl:tsl.bzl", "if_cuda_tools", "if_google", "if_oss") +load("//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") def enforce_glob(files, **kwargs): """A utility to enforce that a list matches a glob expression. diff --git a/third_party/xla/xla/pjrt/c/BUILD b/third_party/xla/xla/pjrt/c/BUILD index a81e6850185..1e984602d30 100644 --- a/third_party/xla/xla/pjrt/c/BUILD +++ b/third_party/xla/xla/pjrt/c/BUILD @@ -3,10 +3,6 @@ load( "if_rocm_is_configured", ) load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load( "//xla:xla.bzl", "xla_cc_binary", @@ -19,6 +15,10 @@ load( "if_macos", "internal_visibility", ) +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/python/BUILD b/third_party/xla/xla/python/BUILD index efadcd2ab47..ff58c7a5f4a 100644 --- a/third_party/xla/xla/python/BUILD +++ b/third_party/xla/xla/python/BUILD @@ -1315,12 +1315,12 @@ tsl_pybind_extension( "//xla/service/cpu:collectives_interface", "//xla/tsl/concurrency:ref_count", "//xla/tsl/distributed_runtime/preemption:preemption_sync_manager", + "//xla/tsl/platform/cloud:gcs_file_system", "//xla/tsl/python/lib/core:numpy", "@local_tsl//tsl/platform", "@local_tsl//tsl/platform:logging", "@local_tsl//tsl/platform:status", "@local_tsl//tsl/platform:statusor", - "@local_tsl//tsl/platform/cloud:gcs_file_system", ] + select({ # gloo tcp transport only builds on linux "//xla/tsl:macos": [ diff --git a/third_party/xla/xla/service/BUILD b/third_party/xla/xla/service/BUILD index 4a2d68d589b..52f10c1e24b 100644 --- a/third_party/xla/xla/service/BUILD +++ b/third_party/xla/xla/service/BUILD @@ -14,10 +14,6 @@ load( "tf_pyclif_proto_library", ) load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:strict.default.bzl", "py_strict_library", "py_strict_test") load( "//xla:xla.bzl", @@ -32,6 +28,10 @@ load("//xla/stream_executor:build_defs.bzl", "if_gpu_is_configured") load("//xla/tests:build_defs.bzl", "xla_test") load("//xla/tsl:tsl.bzl", "if_google", "if_libtpu", "internal_visibility", "tsl_copts") load("//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable", "internal_hlo_deps") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/BUILD b/third_party/xla/xla/service/gpu/BUILD index e47e85b80e7..30a6284ee35 100644 --- a/third_party/xla/xla/service/gpu/BUILD +++ b/third_party/xla/xla/service/gpu/BUILD @@ -17,10 +17,6 @@ load( "@local_tsl//tsl/platform:build_config_root.bzl", "if_static", ) -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:xla.bzl", "xla_cc_test", "xla_internal") load( "//xla/service/gpu:build_defs.bzl", @@ -42,6 +38,10 @@ load( "tsl_gpu_library", ) load("//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/autotuning/BUILD b/third_party/xla/xla/service/gpu/autotuning/BUILD index 627f52cb218..58bc7d7cd01 100644 --- a/third_party/xla/xla/service/gpu/autotuning/BUILD +++ b/third_party/xla/xla/service/gpu/autotuning/BUILD @@ -5,13 +5,13 @@ load( "@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library", ) -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:xla.bzl", "xla_cc_test") load("//xla/tests:build_defs.bzl", "xla_test") load("//xla/tsl:tsl.bzl", "if_oss") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/build_defs.bzl b/third_party/xla/xla/service/gpu/build_defs.bzl index 95b32b6b71f..88d067637d1 100644 --- a/third_party/xla/xla/service/gpu/build_defs.bzl +++ b/third_party/xla/xla/service/gpu/build_defs.bzl @@ -3,7 +3,7 @@ load("@local_config_cuda//cuda:build_defs.bzl", "cuda_library") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured", "rocm_copts", "rocm_library") -load("@local_tsl//tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") +load("//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") load("@bazel_skylib//lib:paths.bzl", "paths") load("//xla/tests:build_defs.bzl", "prepare_gpu_backend_data") diff --git a/third_party/xla/xla/service/gpu/fusions/BUILD b/third_party/xla/xla/service/gpu/fusions/BUILD index 95d1f571e16..33b3cd52a7f 100644 --- a/third_party/xla/xla/service/gpu/fusions/BUILD +++ b/third_party/xla/xla/service/gpu/fusions/BUILD @@ -1,8 +1,8 @@ load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured") -load("@local_tsl//tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") load("//xla:xla.bzl", "xla_cc_test") load("//xla/tests:build_defs.bzl", "xla_test") load("//xla/tsl:tsl.bzl", "if_oss") +load("//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/fusions/triton/BUILD b/third_party/xla/xla/service/gpu/fusions/triton/BUILD index a8fb3e86926..2ff934a6219 100644 --- a/third_party/xla/xla/service/gpu/fusions/triton/BUILD +++ b/third_party/xla/xla/service/gpu/fusions/triton/BUILD @@ -1,7 +1,6 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library") load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured") -load("@local_tsl//tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") load("//xla:xla.bzl", "xla_cc_test") load( "//xla/stream_executor:build_defs.bzl", @@ -9,6 +8,7 @@ load( ) load("//xla/tests:build_defs.bzl", "xla_test") load("//xla/tsl:tsl.bzl", "if_google", "if_oss") +load("//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/kernels/BUILD b/third_party/xla/xla/service/gpu/kernels/BUILD index 1c65f561f00..569227194e9 100644 --- a/third_party/xla/xla/service/gpu/kernels/BUILD +++ b/third_party/xla/xla/service/gpu/kernels/BUILD @@ -1,14 +1,14 @@ load("@local_config_cuda//cuda:build_defs.bzl", "cuda_library") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured") -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:xla.bzl", "xla_cc_binary") load("//xla/service/gpu:build_defs.bzl", "gpu_kernel_library") load("//xla/stream_executor:build_defs.bzl", "if_gpu_is_configured") load("//xla/tests:build_defs.bzl", "DEFAULT_DISABLED_BACKENDS", "xla_test") load("//xla/tsl:tsl.bzl", "if_windows") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/llvm_gpu_backend/BUILD b/third_party/xla/xla/service/gpu/llvm_gpu_backend/BUILD index 613ec0f42fa..774c830e4a8 100644 --- a/third_party/xla/xla/service/gpu/llvm_gpu_backend/BUILD +++ b/third_party/xla/xla/service/gpu/llvm_gpu_backend/BUILD @@ -6,16 +6,16 @@ load( "@local_config_sycl//sycl:build_defs.bzl", "if_sycl_is_configured", ) -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:xla.bzl", "xla_cc_test") load( "//xla/tsl:tsl.bzl", "if_google", "internal_visibility", ) +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/model/BUILD b/third_party/xla/xla/service/gpu/model/BUILD index 330137e53b1..fdd08c2c516 100644 --- a/third_party/xla/xla/service/gpu/model/BUILD +++ b/third_party/xla/xla/service/gpu/model/BUILD @@ -1,13 +1,13 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") -load("@local_tsl//tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") load("//xla:xla.bzl", "xla_cc_test") # Libraries for performance modeling of HLO. load("//xla/tests:build_defs.bzl", "xla_test") load("//xla/tsl:tsl.bzl", "if_google", "if_oss", "internal_visibility") load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") +load("//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/runtime/BUILD b/third_party/xla/xla/service/gpu/runtime/BUILD index 06b5e85cff4..cd46c2dc5bf 100644 --- a/third_party/xla/xla/service/gpu/runtime/BUILD +++ b/third_party/xla/xla/service/gpu/runtime/BUILD @@ -1,11 +1,11 @@ load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured") -load("@local_tsl//tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") load("//xla:xla.bzl", "xla_cc_test") load("//xla/service/gpu:build_defs.bzl", "get_cub_sort_kernel_types") load("//xla/stream_executor:build_defs.bzl", "if_gpu_is_configured") load("//xla/tests:build_defs.bzl", "xla_test") load("//xla/tsl:tsl.bzl", "if_google", "if_nccl", "if_oss", "internal_visibility", "nvtx_headers") load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") +load("//xla/tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/tests/BUILD b/third_party/xla/xla/service/gpu/tests/BUILD index c98ed8ac241..cd46b5a5e71 100644 --- a/third_party/xla/xla/service/gpu/tests/BUILD +++ b/third_party/xla/xla/service/gpu/tests/BUILD @@ -9,10 +9,6 @@ load( "@local_tsl//tsl/platform:build_config_root.bzl", "tf_cuda_tests_tags", ) -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:lit.bzl", "enforce_glob", "lit_test_suite") load( "//xla:xla.bzl", @@ -22,6 +18,10 @@ load("//xla/stream_executor:build_defs.bzl", "if_gpu_is_configured") load("//xla/tests:build_defs.bzl", "xla_test") load("//xla/tsl:tsl.bzl", "if_google", "if_oss") load("//xla/tsl:tsl.default.bzl", "filegroup") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/transforms/BUILD b/third_party/xla/xla/service/gpu/transforms/BUILD index cc081a35692..cdcb8b0c95c 100644 --- a/third_party/xla/xla/service/gpu/transforms/BUILD +++ b/third_party/xla/xla/service/gpu/transforms/BUILD @@ -1,7 +1,3 @@ -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:xla.bzl", "xla_cc_test") load( "//xla/stream_executor:build_defs.bzl", @@ -9,6 +5,10 @@ load( ) load("//xla/tests:build_defs.bzl", "xla_test") load("//xla/tsl:tsl.bzl", "if_google", "if_oss") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/llvm_ir/BUILD b/third_party/xla/xla/service/llvm_ir/BUILD index e4967d168f9..3ce0ac312d1 100644 --- a/third_party/xla/xla/service/llvm_ir/BUILD +++ b/third_party/xla/xla/service/llvm_ir/BUILD @@ -2,13 +2,13 @@ # Libraries for helping construct LLVM IR for XLA backends. load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:xla.bzl", "xla_cc_test") load("//xla/tsl:tsl.bzl", "internal_visibility") load("//xla/tsl:tsl.default.bzl", "filegroup") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/stream_executor/BUILD b/third_party/xla/xla/stream_executor/BUILD index 6f05d961191..57ae9deacd9 100644 --- a/third_party/xla/xla/stream_executor/BUILD +++ b/third_party/xla/xla/stream_executor/BUILD @@ -29,10 +29,10 @@ bzl_library( name = "build_defs_bzl", srcs = ["build_defs.bzl"], deps = [ + "//xla/tsl/platform/default:cuda_build_defs_bzl", "@local_config_cuda//cuda:build_defs_bzl", "@local_tsl//third_party/py/rules_pywrap:pywrap_bzl", "@local_tsl//tsl/platform:rules_cc_bzl", - "@local_tsl//tsl/platform/default:cuda_build_defs_bzl", ] + stream_executor_build_defs_bzl_deps(), ) diff --git a/third_party/xla/xla/stream_executor/cuda/BUILD b/third_party/xla/xla/stream_executor/cuda/BUILD index 22b5976784d..8d34699166f 100644 --- a/third_party/xla/xla/stream_executor/cuda/BUILD +++ b/third_party/xla/xla/stream_executor/cuda/BUILD @@ -8,10 +8,6 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_newer_than", -) load( "//xla:xla.bzl", "xla_cc_test", @@ -32,6 +28,10 @@ load( "internal_visibility", "tsl_copts", ) +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_newer_than", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/stream_executor/gpu/BUILD b/third_party/xla/xla/stream_executor/gpu/BUILD index 11f28579d1f..fdac877cc86 100644 --- a/third_party/xla/xla/stream_executor/gpu/BUILD +++ b/third_party/xla/xla/stream_executor/gpu/BUILD @@ -22,10 +22,6 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:xla.bzl", "xla_cc_test") load( "//xla/service/gpu:build_defs.bzl", @@ -46,6 +42,10 @@ load( "tsl_copts", "tsl_gpu_library", ) +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/tests/BUILD b/third_party/xla/xla/tests/BUILD index b165d2157ba..41df697f178 100644 --- a/third_party/xla/xla/tests/BUILD +++ b/third_party/xla/xla/tests/BUILD @@ -7,15 +7,15 @@ load( "if_rocm_is_configured", ) load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:package_groups.bzl", "xla_tests_package_groups") load("//xla:xla.bzl", "tests_build_defs_bzl_deps", "xla_cc_binary", "xla_cc_test") load("//xla/tests:build_defs.bzl", "generate_backend_suites", "generate_backend_test_macros", "xla_test", "xla_test_library") load("//xla/tsl:tsl.bzl", "if_google", "if_oss", "internal_visibility") load("//xla/tsl:tsl.default.bzl", "filegroup") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/tools/BUILD b/third_party/xla/xla/tools/BUILD index b9a784a4004..7dfde4bfb8c 100644 --- a/third_party/xla/xla/tools/BUILD +++ b/third_party/xla/xla/tools/BUILD @@ -8,10 +8,6 @@ load( "tf_proto_library", ) load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:lit.bzl", "enforce_glob", "lit_test_suite") load( "//xla:xla.bzl", @@ -29,6 +25,10 @@ load( "tsl_gpu_library", ) load("//xla/tsl:tsl.default.bzl", "filegroup") +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/tools/hlo_opt/BUILD b/third_party/xla/xla/tools/hlo_opt/BUILD index 276e15c7cd8..f333fc90beb 100644 --- a/third_party/xla/xla/tools/hlo_opt/BUILD +++ b/third_party/xla/xla/tools/hlo_opt/BUILD @@ -6,12 +6,6 @@ load( "@local_tsl//tsl/platform:build_config_root.bzl", "tf_cuda_tests_tags", ) - -# hlo-opt tool. -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load("//xla:lit.bzl", "enforce_glob", "lit_test_suite") load( "//xla/stream_executor:build_defs.bzl", @@ -19,6 +13,12 @@ load( ) load("//xla/tsl:tsl.default.bzl", "filegroup") +# hlo-opt tool. +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) + package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], default_visibility = ["//xla:internal"], diff --git a/third_party/xla/xla/tsl/cuda/BUILD.bazel b/third_party/xla/xla/tsl/cuda/BUILD.bazel index 393cc5d0364..30be124d9c5 100644 --- a/third_party/xla/xla/tsl/cuda/BUILD.bazel +++ b/third_party/xla/xla/tsl/cuda/BUILD.bazel @@ -6,7 +6,7 @@ load( "cc_library", ) load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", + "@local_xla//xla/tsl/platform/default:cuda_build_defs.bzl", "cuda_rpath_flags", "if_cuda_is_configured", ) diff --git a/third_party/xla/xla/tsl/lib/gtl/BUILD b/third_party/xla/xla/tsl/lib/gtl/BUILD index 9c0c8faf532..c1741ff5b51 100644 --- a/third_party/xla/xla/tsl/lib/gtl/BUILD +++ b/third_party/xla/xla/tsl/lib/gtl/BUILD @@ -20,7 +20,7 @@ package( # tensorflow/core/framework uses map_util, and flatmap "//tensorflow/core/framework:__pkg__", "//xla/tsl/framework:__pkg__", - "@local_tsl//tsl/platform/cloud:__pkg__", + "//xla/tsl/platform/cloud:__pkg__", # tensorflow/core/util uses inlined_vector "//tensorflow/core/util:__pkg__", # tensorflow/core/tfrt/utils uses inlined_vector diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/BUILD b/third_party/xla/xla/tsl/platform/cloud/BUILD similarity index 50% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/BUILD rename to third_party/xla/xla/tsl/platform/cloud/BUILD index d6a7f8cb632..cf9fed5221e 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/BUILD +++ b/third_party/xla/xla/tsl/platform/cloud/BUILD @@ -1,14 +1,14 @@ # Description: # Cloud file system implementation. +load("@local_tsl//tsl/platform:build_config.bzl", "tsl_cc_test") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load( - "@local_xla//xla/tsl:tsl.bzl", + "//xla/tsl:tsl.bzl", "if_windows", "internal_visibility", "tsl_copts", ) -load("//tsl/platform:build_config.bzl", "tsl_cc_test") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -33,10 +33,10 @@ cc_library( hdrs = ["expiring_lru_cache.h"], copts = tsl_copts(), deps = [ - "//tsl/platform:env", - "//tsl/platform:mutex", - "//tsl/platform:thread_annotations", - "//tsl/platform:types", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:thread_annotations", + "@local_tsl//tsl/platform:types", ], ) @@ -45,13 +45,13 @@ cc_library( hdrs = ["file_block_cache.h"], copts = tsl_copts(), deps = [ - "//tsl/platform:env", - "//tsl/platform:mutex", - "//tsl/platform:notification", - "//tsl/platform:status", - "//tsl/platform:stringpiece", - "//tsl/platform:thread_annotations", - "//tsl/platform:types", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:notification", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:stringpiece", + "@local_tsl//tsl/platform:thread_annotations", + "@local_tsl//tsl/platform:types", ], ) @@ -63,14 +63,14 @@ cc_library( visibility = ["//visibility:public"], deps = [ ":file_block_cache", - "//tsl/platform:env", - "//tsl/platform:mutex", - "//tsl/platform:notification", - "//tsl/platform:status", - "//tsl/platform:stringpiece", - "//tsl/platform:thread_annotations", - "//tsl/platform:types", "@com_google_absl//absl/cleanup", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:notification", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:stringpiece", + "@local_tsl//tsl/platform:thread_annotations", + "@local_tsl//tsl/platform:types", ], ) @@ -81,12 +81,12 @@ cc_library( copts = tsl_copts(), deps = [ ":http_request", - "//tsl/platform:env", - "//tsl/platform:errors", - "//tsl/platform:retrying_utils", - "//tsl/platform:status", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:retrying_utils", + "@local_tsl//tsl/platform:status", ], ) @@ -96,7 +96,7 @@ cc_library( hdrs = ["gcs_throttle.h"], copts = tsl_copts(), deps = [ - "//tsl/platform:env", + "@local_tsl//tsl/platform:env", ], ) @@ -118,25 +118,25 @@ cc_library( ":http_request", ":ram_file_block_cache", ":time_util", - "//tsl/platform:env", - "//tsl/platform:errors", - "//tsl/platform:file_statistics", - "//tsl/platform:mutex", - "//tsl/platform:numbers", - "//tsl/platform:path", - "//tsl/platform:protobuf", - "//tsl/platform:retrying_file_system", - "//tsl/platform:retrying_utils", - "//tsl/platform:status", - "//tsl/platform:str_util", - "//tsl/platform:strcat", - "//tsl/platform:stringprintf", - "//tsl/platform:thread_annotations", - "//tsl/profiler/lib:traceme", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@jsoncpp_git//:jsoncpp", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:file_statistics", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:numbers", + "@local_tsl//tsl/platform:path", + "@local_tsl//tsl/platform:protobuf", + "@local_tsl//tsl/platform:retrying_file_system", + "@local_tsl//tsl/platform:retrying_utils", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:str_util", + "@local_tsl//tsl/platform:strcat", + "@local_tsl//tsl/platform:stringprintf", + "@local_tsl//tsl/platform:thread_annotations", + "@local_tsl//tsl/profiler/lib:traceme", ], alwayslink = 1, ) @@ -162,25 +162,25 @@ cc_library( ":http_request", ":ram_file_block_cache", ":time_util", - "//tsl/platform:env", - "//tsl/platform:errors", - "//tsl/platform:file_statistics", - "//tsl/platform:mutex", - "//tsl/platform:numbers", - "//tsl/platform:path", - "//tsl/platform:protobuf", - "//tsl/platform:retrying_file_system", - "//tsl/platform:retrying_utils", - "//tsl/platform:status", - "//tsl/platform:str_util", - "//tsl/platform:strcat", - "//tsl/platform:stringprintf", - "//tsl/platform:thread_annotations", - "//tsl/profiler/lib:traceme", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@jsoncpp_git//:jsoncpp", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:file_statistics", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:numbers", + "@local_tsl//tsl/platform:path", + "@local_tsl//tsl/platform:protobuf", + "@local_tsl//tsl/platform:retrying_file_system", + "@local_tsl//tsl/platform:retrying_utils", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:str_util", + "@local_tsl//tsl/platform:strcat", + "@local_tsl//tsl/platform:stringprintf", + "@local_tsl//tsl/platform:thread_annotations", + "@local_tsl//tsl/profiler/lib:traceme", ], alwayslink = 1, ) @@ -190,13 +190,13 @@ cc_library( hdrs = ["http_request.h"], copts = tsl_copts(), deps = [ - "//tsl/platform:env", - "//tsl/platform:errors", - "//tsl/platform:macros", - "//tsl/platform:protobuf", - "//tsl/platform:status", - "//tsl/platform:stringpiece", - "//tsl/platform:types", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:protobuf", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:stringpiece", + "@local_tsl//tsl/platform:types", ], ) @@ -207,18 +207,18 @@ cc_library( copts = tsl_copts(), deps = [ ":http_request", - "//tsl/platform:env", - "//tsl/platform:errors", - "//tsl/platform:macros", - "//tsl/platform:protobuf", - "//tsl/platform:scanner", - "//tsl/platform:status", - "//tsl/platform:str_util", - "//tsl/platform:stringpiece", - "//tsl/platform:types", + "//xla/tsl/lib/gtl:map_util", + "//xla/tsl/util:env_var", "@curl", - "@local_xla//xla/tsl/lib/gtl:map_util", - "@local_xla//xla/tsl/util:env_var", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:protobuf", + "@local_tsl//tsl/platform:scanner", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:str_util", + "@local_tsl//tsl/platform:stringpiece", + "@local_tsl//tsl/platform:types", ], ) @@ -231,15 +231,15 @@ cc_library( copts = tsl_copts(), deps = [ ":curl_http_request", - "//tsl/platform:errors", - "//tsl/platform:macros", - "//tsl/platform:protobuf", - "//tsl/platform:status", - "//tsl/platform:stringpiece", - "//tsl/platform:test", - "//tsl/platform:types", + "//xla/tsl/lib/core:status_test_util", "@curl", - "@local_xla//xla/tsl/lib/core:status_test_util", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:protobuf", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:stringpiece", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:types", ], ) @@ -254,16 +254,16 @@ cc_library( deps = [ ":compute_engine_metadata_client", ":oauth_client", - "//tsl/platform:base64", - "//tsl/platform:env", - "//tsl/platform:errors", - "//tsl/platform:mutex", - "//tsl/platform:path", - "//tsl/platform:retrying_utils", - "//tsl/platform:status", - "//tsl/platform:thread_annotations", "@com_google_absl//absl/strings", "@jsoncpp_git//:jsoncpp", + "@local_tsl//tsl/platform:base64", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:path", + "@local_tsl//tsl/platform:retrying_utils", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:thread_annotations", ], ) @@ -279,10 +279,10 @@ cc_library( deps = [ ":curl_http_request", ":http_request", - "//tsl/platform:env", - "//tsl/platform:retrying_utils", - "//tsl/platform:status", "@com_google_absl//absl/strings", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:retrying_utils", + "@local_tsl//tsl/platform:status", ], ) @@ -298,9 +298,9 @@ cc_library( copts = tsl_copts(), deps = [ ":compute_engine_metadata_client", - "//tsl/platform:errors", - "//tsl/platform:status", - "//tsl/platform:str_util", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:str_util", ], ) @@ -310,9 +310,9 @@ cc_library( hdrs = ["now_seconds_env.h"], copts = tsl_copts(), deps = [ - "//tsl/platform:env", - "//tsl/platform:mutex", - "//tsl/platform:types", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:types", ], ) @@ -328,12 +328,12 @@ cc_library( deps = [ ":curl_http_request", ":http_request", - "//tsl/platform:base64", - "//tsl/platform:env", - "//tsl/platform:errors", - "//tsl/platform:status", "@boringssl//:crypto", "@jsoncpp_git//:jsoncpp", + "@local_tsl//tsl/platform:base64", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:status", ], ) @@ -347,8 +347,8 @@ cc_library( ], copts = tsl_copts(), deps = [ - "//tsl/platform:errors", - "//tsl/platform:status", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:status", ], ) @@ -359,10 +359,10 @@ tsl_cc_test( deps = [ ":expiring_lru_cache", ":now_seconds_env", - "//tsl/platform:env_impl", - "//tsl/platform:test", - "//tsl/platform:test_main", - "@local_xla//xla/tsl/lib/core:status_test_util", + "//xla/tsl/lib/core:status_test_util", + "@local_tsl//tsl/platform:env_impl", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) @@ -373,13 +373,13 @@ tsl_cc_test( deps = [ ":now_seconds_env", ":ram_file_block_cache", - "//tsl/platform:blocking_counter", - "//tsl/platform:env", - "//tsl/platform:env_impl", - "//tsl/platform:notification", - "//tsl/platform:test", - "//tsl/platform:test_main", - "@local_xla//xla/tsl/lib/core:status_test_util", + "//xla/tsl/lib/core:status_test_util", + "@local_tsl//tsl/platform:blocking_counter", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:env_impl", + "@local_tsl//tsl/platform:notification", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) @@ -390,15 +390,15 @@ tsl_cc_test( deps = [ ":gcs_file_system", ":http_request_fake", - "//tsl/platform:env_impl", - "//tsl/platform:errors", - "//tsl/platform:str_util", - "//tsl/platform:strcat", - "//tsl/platform:test", - "//tsl/platform:test_main", - "@local_xla//xla/tsl/lib/core:status_test_util", - "@local_xla//xla/tsl/profiler/backends/cpu:traceme_recorder_impl", - "@local_xla//xla/tsl/profiler/utils:time_utils_impl", + "//xla/tsl/lib/core:status_test_util", + "//xla/tsl/profiler/backends/cpu:traceme_recorder_impl", + "//xla/tsl/profiler/utils:time_utils_impl", + "@local_tsl//tsl/platform:env_impl", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:str_util", + "@local_tsl//tsl/platform:strcat", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) @@ -409,10 +409,10 @@ tsl_cc_test( linkopts = if_windows(["-DEFAULTLIB:ws2_32.lib"]), deps = [ ":gcs_dns_cache", - "//tsl/platform:env_impl", - "//tsl/platform:str_util", - "//tsl/platform:test", - "//tsl/platform:test_main", + "@local_tsl//tsl/platform:env_impl", + "@local_tsl//tsl/platform:str_util", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) @@ -423,11 +423,11 @@ tsl_cc_test( linkopts = if_windows(["-DEFAULTLIB:ws2_32.lib"]), deps = [ ":gcs_throttle", - "//tsl/platform:env_impl", - "//tsl/platform:str_util", - "//tsl/platform:test", - "//tsl/platform:test_main", - "@local_xla//xla/tsl/lib/core:status_test_util", + "//xla/tsl/lib/core:status_test_util", + "@local_tsl//tsl/platform:env_impl", + "@local_tsl//tsl/platform:str_util", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) @@ -437,15 +437,15 @@ tsl_cc_test( srcs = ["curl_http_request_test.cc"], deps = [ ":curl_http_request", - "//tsl/platform", - "//tsl/platform:env_impl", - "//tsl/platform:path", - "//tsl/platform:platform_port", - "//tsl/platform:test", - "//tsl/platform:test_main", + "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", - "@local_xla//xla/tsl/lib/core:status_test_util", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:env_impl", + "@local_tsl//tsl/platform:path", + "@local_tsl//tsl/platform:platform_port", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) @@ -454,22 +454,22 @@ tsl_cc_test( size = "small", srcs = ["oauth_client_test.cc"], data = [ - "//tsl/platform/cloud/testdata:service_account_credentials", - "//tsl/platform/cloud/testdata:service_account_public_key", + "//xla/tsl/platform/cloud/testdata:service_account_credentials", + "//xla/tsl/platform/cloud/testdata:service_account_public_key", ], tags = ["no_oss"], # TODO(b/327036247): revisit after this moves to XLA deps = [ ":http_request_fake", ":oauth_client", - "//tsl/platform:base64", - "//tsl/platform:env", - "//tsl/platform:env_impl", - "//tsl/platform:path", - "//tsl/platform:scanner", - "//tsl/platform:test", - "//tsl/platform:test_main", + "//xla/tsl/lib/core:status_test_util", "@boringssl//:crypto", - "@local_xla//xla/tsl/lib/core:status_test_util", + "@local_tsl//tsl/platform:base64", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:env_impl", + "@local_tsl//tsl/platform:path", + "@local_tsl//tsl/platform:scanner", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) @@ -478,19 +478,19 @@ tsl_cc_test( size = "small", srcs = ["google_auth_provider_test.cc"], data = [ - "//tsl/platform/cloud/testdata:application_default_credentials", - "//tsl/platform/cloud/testdata:service_account_credentials", + "//xla/tsl/platform/cloud/testdata:application_default_credentials", + "//xla/tsl/platform/cloud/testdata:service_account_credentials", ], tags = ["no_oss"], # TODO(b/327036247): revisit after this moves to XLA deps = [ ":google_auth_provider", ":http_request_fake", ":oauth_client", - "//tsl/platform:env_impl", - "//tsl/platform:path", - "//tsl/platform:test", - "//tsl/platform:test_main", - "@local_xla//xla/tsl/lib/core:status_test_util", + "//xla/tsl/lib/core:status_test_util", + "@local_tsl//tsl/platform:env_impl", + "@local_tsl//tsl/platform:path", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) @@ -501,10 +501,10 @@ tsl_cc_test( deps = [ ":compute_engine_metadata_client", ":http_request_fake", - "//tsl/platform:env", - "//tsl/platform:env_impl", - "//tsl/platform:test", - "//tsl/platform:test_main", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:env_impl", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) @@ -515,9 +515,9 @@ tsl_cc_test( deps = [ ":compute_engine_zone_provider", ":http_request_fake", - "//tsl/platform:env_impl", - "//tsl/platform:test", - "//tsl/platform:test_main", + "@local_tsl//tsl/platform:env_impl", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) @@ -527,8 +527,8 @@ tsl_cc_test( srcs = ["time_util_test.cc"], deps = [ ":time_util", - "//tsl/platform:test", - "//tsl/platform:test_main", - "@local_xla//xla/tsl/lib/core:status_test_util", + "//xla/tsl/lib/core:status_test_util", + "@local_tsl//tsl/platform:test", + "@local_tsl//tsl/platform:test_main", ], ) diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/auth_provider.h b/third_party/xla/xla/tsl/platform/cloud/auth_provider.h similarity index 90% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/auth_provider.h rename to third_party/xla/xla/tsl/platform/cloud/auth_provider.h index 4b1b2927581..6b18ed81750 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/auth_provider.h +++ b/third_party/xla/xla/tsl/platform/cloud/auth_provider.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_AUTH_PROVIDER_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_AUTH_PROVIDER_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_AUTH_PROVIDER_H_ +#define XLA_TSL_PLATFORM_CLOUD_AUTH_PROVIDER_H_ #include @@ -52,4 +52,4 @@ class EmptyAuthProvider : public AuthProvider { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_AUTH_PROVIDER_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_AUTH_PROVIDER_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_metadata_client.cc b/third_party/xla/xla/tsl/platform/cloud/compute_engine_metadata_client.cc similarity index 94% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_metadata_client.cc rename to third_party/xla/xla/tsl/platform/cloud/compute_engine_metadata_client.cc index 7a41c8f37b7..586c91a0b8b 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_metadata_client.cc +++ b/third_party/xla/xla/tsl/platform/cloud/compute_engine_metadata_client.cc @@ -13,13 +13,13 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/compute_engine_metadata_client.h" +#include "xla/tsl/platform/cloud/compute_engine_metadata_client.h" #include #include #include "absl/strings/str_cat.h" -#include "tsl/platform/cloud/curl_http_request.h" +#include "xla/tsl/platform/cloud/curl_http_request.h" namespace tsl { diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_metadata_client.h b/third_party/xla/xla/tsl/platform/cloud/compute_engine_metadata_client.h similarity index 90% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_metadata_client.h rename to third_party/xla/xla/tsl/platform/cloud/compute_engine_metadata_client.h index 1337d33c8e1..c220d0a88c1 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_metadata_client.h +++ b/third_party/xla/xla/tsl/platform/cloud/compute_engine_metadata_client.h @@ -13,10 +13,10 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_METADATA_CLIENT_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_METADATA_CLIENT_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_METADATA_CLIENT_H_ +#define XLA_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_METADATA_CLIENT_H_ -#include "tsl/platform/cloud/http_request.h" +#include "xla/tsl/platform/cloud/http_request.h" #include "tsl/platform/retrying_utils.h" #include "tsl/platform/status.h" @@ -64,4 +64,4 @@ class ComputeEngineMetadataClient { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_METADATA_CLIENT_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_METADATA_CLIENT_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_metadata_client_test.cc b/third_party/xla/xla/tsl/platform/cloud/compute_engine_metadata_client_test.cc similarity index 96% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_metadata_client_test.cc rename to third_party/xla/xla/tsl/platform/cloud/compute_engine_metadata_client_test.cc index ec350418e6d..948d177fd84 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_metadata_client_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/compute_engine_metadata_client_test.cc @@ -13,9 +13,9 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/compute_engine_metadata_client.h" +#include "xla/tsl/platform/cloud/compute_engine_metadata_client.h" -#include "tsl/platform/cloud/http_request_fake.h" +#include "xla/tsl/platform/cloud/http_request_fake.h" #include "tsl/platform/env.h" #include "tsl/platform/test.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_zone_provider.cc b/third_party/xla/xla/tsl/platform/cloud/compute_engine_zone_provider.cc similarity index 96% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_zone_provider.cc rename to third_party/xla/xla/tsl/platform/cloud/compute_engine_zone_provider.cc index 19f27556d44..be878e3099e 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_zone_provider.cc +++ b/third_party/xla/xla/tsl/platform/cloud/compute_engine_zone_provider.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/compute_engine_zone_provider.h" +#include "xla/tsl/platform/cloud/compute_engine_zone_provider.h" #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_zone_provider.h b/third_party/xla/xla/tsl/platform/cloud/compute_engine_zone_provider.h similarity index 79% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_zone_provider.h rename to third_party/xla/xla/tsl/platform/cloud/compute_engine_zone_provider.h index 99ed41fca7d..e54b8aba42a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_zone_provider.h +++ b/third_party/xla/xla/tsl/platform/cloud/compute_engine_zone_provider.h @@ -13,11 +13,11 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_ZONE_PROVIDER_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_ZONE_PROVIDER_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_ZONE_PROVIDER_H_ +#define XLA_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_ZONE_PROVIDER_H_ -#include "tsl/platform/cloud/compute_engine_metadata_client.h" -#include "tsl/platform/cloud/zone_provider.h" +#include "xla/tsl/platform/cloud/compute_engine_metadata_client.h" +#include "xla/tsl/platform/cloud/zone_provider.h" namespace tsl { @@ -38,4 +38,4 @@ class ComputeEngineZoneProvider : public ZoneProvider { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_ZONE_PROVIDER_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_ZONE_PROVIDER_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_zone_provider_test.cc b/third_party/xla/xla/tsl/platform/cloud/compute_engine_zone_provider_test.cc similarity index 94% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_zone_provider_test.cc rename to third_party/xla/xla/tsl/platform/cloud/compute_engine_zone_provider_test.cc index cb991ad119b..c78a7b19a4a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_zone_provider_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/compute_engine_zone_provider_test.cc @@ -13,9 +13,9 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/compute_engine_zone_provider.h" +#include "xla/tsl/platform/cloud/compute_engine_zone_provider.h" -#include "tsl/platform/cloud/http_request_fake.h" +#include "xla/tsl/platform/cloud/http_request_fake.h" #include "tsl/platform/test.h" namespace tsl { diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/curl_http_request.cc b/third_party/xla/xla/tsl/platform/cloud/curl_http_request.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/curl_http_request.cc rename to third_party/xla/xla/tsl/platform/cloud/curl_http_request.cc index fde422c2d04..fb034333251 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/curl_http_request.cc +++ b/third_party/xla/xla/tsl/platform/cloud/curl_http_request.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/curl_http_request.h" +#include "xla/tsl/platform/cloud/curl_http_request.h" #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/curl_http_request.h b/third_party/xla/xla/tsl/platform/cloud/curl_http_request.h similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/curl_http_request.h rename to third_party/xla/xla/tsl/platform/cloud/curl_http_request.h index 4c64758a0bd..d2ba933227a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/curl_http_request.h +++ b/third_party/xla/xla/tsl/platform/cloud/curl_http_request.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_CURL_HTTP_REQUEST_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_CURL_HTTP_REQUEST_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_CURL_HTTP_REQUEST_H_ +#define XLA_TSL_PLATFORM_CLOUD_CURL_HTTP_REQUEST_H_ #include @@ -22,7 +22,7 @@ limitations under the License. #include #include -#include "tsl/platform/cloud/http_request.h" +#include "xla/tsl/platform/cloud/http_request.h" #include "tsl/platform/env.h" #include "tsl/platform/errors.h" #include "tsl/platform/macros.h" @@ -274,4 +274,4 @@ class LibCurl { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_CURL_HTTP_REQUEST_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_CURL_HTTP_REQUEST_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/curl_http_request_test.cc b/third_party/xla/xla/tsl/platform/cloud/curl_http_request_test.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/curl_http_request_test.cc rename to third_party/xla/xla/tsl/platform/cloud/curl_http_request_test.cc index e60f18bfa6d..d4469b491c2 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/curl_http_request_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/curl_http_request_test.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/curl_http_request.h" +#include "xla/tsl/platform/cloud/curl_http_request.h" #include #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/expiring_lru_cache.h b/third_party/xla/xla/tsl/platform/cloud/expiring_lru_cache.h similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/expiring_lru_cache.h rename to third_party/xla/xla/tsl/platform/cloud/expiring_lru_cache.h index d3a15bc9fa3..58f86d1fa25 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/expiring_lru_cache.h +++ b/third_party/xla/xla/tsl/platform/cloud/expiring_lru_cache.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_EXPIRING_LRU_CACHE_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_EXPIRING_LRU_CACHE_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_EXPIRING_LRU_CACHE_H_ +#define XLA_TSL_PLATFORM_CLOUD_EXPIRING_LRU_CACHE_H_ #include #include @@ -185,4 +185,4 @@ class ExpiringLRUCache { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_EXPIRING_LRU_CACHE_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_EXPIRING_LRU_CACHE_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/expiring_lru_cache_test.cc b/third_party/xla/xla/tsl/platform/cloud/expiring_lru_cache_test.cc similarity index 98% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/expiring_lru_cache_test.cc rename to third_party/xla/xla/tsl/platform/cloud/expiring_lru_cache_test.cc index 7225dca6e50..58cb1aebfcf 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/expiring_lru_cache_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/expiring_lru_cache_test.cc @@ -13,12 +13,12 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/expiring_lru_cache.h" +#include "xla/tsl/platform/cloud/expiring_lru_cache.h" #include #include "xla/tsl/lib/core/status_test_util.h" -#include "tsl/platform/cloud/now_seconds_env.h" +#include "xla/tsl/platform/cloud/now_seconds_env.h" #include "tsl/platform/test.h" namespace tsl { diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/file_block_cache.h b/third_party/xla/xla/tsl/platform/cloud/file_block_cache.h similarity index 96% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/file_block_cache.h rename to third_party/xla/xla/tsl/platform/cloud/file_block_cache.h index 59927545f7e..20543efd881 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/file_block_cache.h +++ b/third_party/xla/xla/tsl/platform/cloud/file_block_cache.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_FILE_BLOCK_CACHE_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_FILE_BLOCK_CACHE_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_FILE_BLOCK_CACHE_H_ +#define XLA_TSL_PLATFORM_CLOUD_FILE_BLOCK_CACHE_H_ #include #include @@ -136,4 +136,4 @@ class FileBlockCache { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_FILE_BLOCK_CACHE_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_FILE_BLOCK_CACHE_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_dns_cache.cc b/third_party/xla/xla/tsl/platform/cloud/gcs_dns_cache.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_dns_cache.cc rename to third_party/xla/xla/tsl/platform/cloud/gcs_dns_cache.cc index 594703f31ff..dea209a795a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_dns_cache.cc +++ b/third_party/xla/xla/tsl/platform/cloud/gcs_dns_cache.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/gcs_dns_cache.h" +#include "xla/tsl/platform/cloud/gcs_dns_cache.h" #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_dns_cache.h b/third_party/xla/xla/tsl/platform/cloud/gcs_dns_cache.h similarity index 92% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_dns_cache.h rename to third_party/xla/xla/tsl/platform/cloud/gcs_dns_cache.h index b2883fb1363..a29fe502854 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_dns_cache.h +++ b/third_party/xla/xla/tsl/platform/cloud/gcs_dns_cache.h @@ -13,12 +13,12 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_DNS_CACHE_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_DNS_CACHE_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_GCS_DNS_CACHE_H_ +#define XLA_TSL_PLATFORM_CLOUD_GCS_DNS_CACHE_H_ #include -#include "tsl/platform/cloud/http_request.h" +#include "xla/tsl/platform/cloud/http_request.h" #include "tsl/platform/env.h" namespace tsl { @@ -74,4 +74,4 @@ class GcsDnsCache { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_DNS_CACHE_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_GCS_DNS_CACHE_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_dns_cache_test.cc b/third_party/xla/xla/tsl/platform/cloud/gcs_dns_cache_test.cc similarity index 98% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_dns_cache_test.cc rename to third_party/xla/xla/tsl/platform/cloud/gcs_dns_cache_test.cc index a5ce0882ba5..dc250f0015b 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_dns_cache_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/gcs_dns_cache_test.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/gcs_dns_cache.h" +#include "xla/tsl/platform/cloud/gcs_dns_cache.h" #include "tsl/platform/str_util.h" #include "tsl/platform/test.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_file_system.cc b/third_party/xla/xla/tsl/platform/cloud/gcs_file_system.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_file_system.cc rename to third_party/xla/xla/tsl/platform/cloud/gcs_file_system.cc index c1cc244e0dc..bd41552dbf9 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_file_system.cc +++ b/third_party/xla/xla/tsl/platform/cloud/gcs_file_system.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/gcs_file_system.h" +#include "xla/tsl/platform/cloud/gcs_file_system.h" #include @@ -41,11 +41,11 @@ limitations under the License. #endif #include "absl/base/macros.h" #include "json/json.h" -#include "tsl/platform/cloud/curl_http_request.h" -#include "tsl/platform/cloud/file_block_cache.h" -#include "tsl/platform/cloud/google_auth_provider.h" -#include "tsl/platform/cloud/ram_file_block_cache.h" -#include "tsl/platform/cloud/time_util.h" +#include "xla/tsl/platform/cloud/curl_http_request.h" +#include "xla/tsl/platform/cloud/file_block_cache.h" +#include "xla/tsl/platform/cloud/google_auth_provider.h" +#include "xla/tsl/platform/cloud/ram_file_block_cache.h" +#include "xla/tsl/platform/cloud/time_util.h" #include "tsl/platform/env.h" #include "tsl/platform/errors.h" #include "tsl/platform/mutex.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_file_system.h b/third_party/xla/xla/tsl/platform/cloud/gcs_file_system.h similarity index 96% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_file_system.h rename to third_party/xla/xla/tsl/platform/cloud/gcs_file_system.h index f7452a4eb69..28553241cf0 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_file_system.h +++ b/third_party/xla/xla/tsl/platform/cloud/gcs_file_system.h @@ -13,22 +13,22 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_FILE_SYSTEM_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_FILE_SYSTEM_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_GCS_FILE_SYSTEM_H_ +#define XLA_TSL_PLATFORM_CLOUD_GCS_FILE_SYSTEM_H_ #include #include #include #include -#include "tsl/platform/cloud/auth_provider.h" -#include "tsl/platform/cloud/compute_engine_metadata_client.h" -#include "tsl/platform/cloud/compute_engine_zone_provider.h" -#include "tsl/platform/cloud/expiring_lru_cache.h" -#include "tsl/platform/cloud/file_block_cache.h" -#include "tsl/platform/cloud/gcs_dns_cache.h" -#include "tsl/platform/cloud/gcs_throttle.h" -#include "tsl/platform/cloud/http_request.h" +#include "xla/tsl/platform/cloud/auth_provider.h" +#include "xla/tsl/platform/cloud/compute_engine_metadata_client.h" +#include "xla/tsl/platform/cloud/compute_engine_zone_provider.h" +#include "xla/tsl/platform/cloud/expiring_lru_cache.h" +#include "xla/tsl/platform/cloud/file_block_cache.h" +#include "xla/tsl/platform/cloud/gcs_dns_cache.h" +#include "xla/tsl/platform/cloud/gcs_throttle.h" +#include "xla/tsl/platform/cloud/http_request.h" #include "tsl/platform/file_system.h" #include "tsl/platform/retrying_file_system.h" #include "tsl/platform/status.h" @@ -461,4 +461,4 @@ class RetryingGcsFileSystem : public RetryingFileSystem { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_FILE_SYSTEM_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_GCS_FILE_SYSTEM_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_file_system_test.cc b/third_party/xla/xla/tsl/platform/cloud/gcs_file_system_test.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_file_system_test.cc rename to third_party/xla/xla/tsl/platform/cloud/gcs_file_system_test.cc index 9d9d3088467..add584b739f 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_file_system_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/gcs_file_system_test.cc @@ -13,12 +13,12 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/gcs_file_system.h" +#include "xla/tsl/platform/cloud/gcs_file_system.h" #include #include "xla/tsl/lib/core/status_test_util.h" -#include "tsl/platform/cloud/http_request_fake.h" +#include "xla/tsl/platform/cloud/http_request_fake.h" #include "tsl/platform/errors.h" #include "tsl/platform/str_util.h" #include "tsl/platform/strcat.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_throttle.cc b/third_party/xla/xla/tsl/platform/cloud/gcs_throttle.cc similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_throttle.cc rename to third_party/xla/xla/tsl/platform/cloud/gcs_throttle.cc index 86c49941cf2..d0bb7b1e701 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_throttle.cc +++ b/third_party/xla/xla/tsl/platform/cloud/gcs_throttle.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/gcs_throttle.h" +#include "xla/tsl/platform/cloud/gcs_throttle.h" #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_throttle.h b/third_party/xla/xla/tsl/platform/cloud/gcs_throttle.h similarity index 96% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_throttle.h rename to third_party/xla/xla/tsl/platform/cloud/gcs_throttle.h index 7067349d3cd..c86305bc323 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_throttle.h +++ b/third_party/xla/xla/tsl/platform/cloud/gcs_throttle.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_THROTTLE_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_THROTTLE_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_GCS_THROTTLE_H_ +#define XLA_TSL_PLATFORM_CLOUD_GCS_THROTTLE_H_ #include "tsl/platform/env.h" @@ -165,4 +165,4 @@ class GcsThrottle { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_THROTTLE_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_GCS_THROTTLE_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_throttle_test.cc b/third_party/xla/xla/tsl/platform/cloud/gcs_throttle_test.cc similarity index 98% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_throttle_test.cc rename to third_party/xla/xla/tsl/platform/cloud/gcs_throttle_test.cc index 658629fab6b..dfbd3c6e78e 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/gcs_throttle_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/gcs_throttle_test.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/gcs_throttle.h" +#include "xla/tsl/platform/cloud/gcs_throttle.h" #include "xla/tsl/lib/core/status_test_util.h" #include "tsl/platform/str_util.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/google_auth_provider.cc b/third_party/xla/xla/tsl/platform/cloud/google_auth_provider.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/google_auth_provider.cc rename to third_party/xla/xla/tsl/platform/cloud/google_auth_provider.cc index 7f1f94dc778..edf220b295c 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/google_auth_provider.cc +++ b/third_party/xla/xla/tsl/platform/cloud/google_auth_provider.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/google_auth_provider.h" +#include "xla/tsl/platform/cloud/google_auth_provider.h" #ifndef _WIN32 #include #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/google_auth_provider.h b/third_party/xla/xla/tsl/platform/cloud/google_auth_provider.h similarity index 87% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/google_auth_provider.h rename to third_party/xla/xla/tsl/platform/cloud/google_auth_provider.h index 38ab66df63c..79b8b90c778 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/google_auth_provider.h +++ b/third_party/xla/xla/tsl/platform/cloud/google_auth_provider.h @@ -13,14 +13,14 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_GOOGLE_AUTH_PROVIDER_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_GOOGLE_AUTH_PROVIDER_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_GOOGLE_AUTH_PROVIDER_H_ +#define XLA_TSL_PLATFORM_CLOUD_GOOGLE_AUTH_PROVIDER_H_ #include -#include "tsl/platform/cloud/auth_provider.h" -#include "tsl/platform/cloud/compute_engine_metadata_client.h" -#include "tsl/platform/cloud/oauth_client.h" +#include "xla/tsl/platform/cloud/auth_provider.h" +#include "xla/tsl/platform/cloud/compute_engine_metadata_client.h" +#include "xla/tsl/platform/cloud/oauth_client.h" #include "tsl/platform/mutex.h" #include "tsl/platform/thread_annotations.h" @@ -67,4 +67,4 @@ class GoogleAuthProvider : public AuthProvider { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_GOOGLE_AUTH_PROVIDER_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_GOOGLE_AUTH_PROVIDER_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/google_auth_provider_test.cc b/third_party/xla/xla/tsl/platform/cloud/google_auth_provider_test.cc similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/google_auth_provider_test.cc rename to third_party/xla/xla/tsl/platform/cloud/google_auth_provider_test.cc index e7d6c4aab68..cd378144e89 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/google_auth_provider_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/google_auth_provider_test.cc @@ -13,12 +13,12 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/google_auth_provider.h" +#include "xla/tsl/platform/cloud/google_auth_provider.h" #include #include "xla/tsl/lib/core/status_test_util.h" -#include "tsl/platform/cloud/http_request_fake.h" +#include "xla/tsl/platform/cloud/http_request_fake.h" #include "tsl/platform/path.h" #include "tsl/platform/test.h" @@ -27,7 +27,8 @@ namespace tsl { namespace { string TestData() { - return io::JoinPath(testing::TslSrcRoot(), "platform", "cloud", "testdata"); + return io::JoinPath(testing::XlaSrcRoot(), "tsl", "platform", "cloud", + "testdata"); } class FakeEnv : public EnvWrapper { diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/http_request.h b/third_party/xla/xla/tsl/platform/cloud/http_request.h similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/http_request.h rename to third_party/xla/xla/tsl/platform/cloud/http_request.h index 8102dd666a7..b9cb805e4bc 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/http_request.h +++ b/third_party/xla/xla/tsl/platform/cloud/http_request.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_HTTP_REQUEST_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_HTTP_REQUEST_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_HTTP_REQUEST_H_ +#define XLA_TSL_PLATFORM_CLOUD_HTTP_REQUEST_H_ #include #include @@ -192,4 +192,4 @@ class HttpRequest { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_HTTP_REQUEST_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_HTTP_REQUEST_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/http_request_fake.h b/third_party/xla/xla/tsl/platform/cloud/http_request_fake.h similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/http_request_fake.h rename to third_party/xla/xla/tsl/platform/cloud/http_request_fake.h index 869d2abca6e..c166cba3117 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/http_request_fake.h +++ b/third_party/xla/xla/tsl/platform/cloud/http_request_fake.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_HTTP_REQUEST_FAKE_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_HTTP_REQUEST_FAKE_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_HTTP_REQUEST_FAKE_H_ +#define XLA_TSL_PLATFORM_CLOUD_HTTP_REQUEST_FAKE_H_ #include #include @@ -22,7 +22,7 @@ limitations under the License. #include #include "xla/tsl/lib/core/status_test_util.h" -#include "tsl/platform/cloud/curl_http_request.h" +#include "xla/tsl/platform/cloud/curl_http_request.h" #include "tsl/platform/errors.h" #include "tsl/platform/macros.h" #include "tsl/platform/protobuf.h" @@ -214,4 +214,4 @@ class FakeHttpRequestFactory : public HttpRequest::Factory { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_HTTP_REQUEST_FAKE_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_HTTP_REQUEST_FAKE_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/now_seconds_env.h b/third_party/xla/xla/tsl/platform/cloud/now_seconds_env.h similarity index 88% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/now_seconds_env.h rename to third_party/xla/xla/tsl/platform/cloud/now_seconds_env.h index ac783748a76..4f24d7c4094 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/now_seconds_env.h +++ b/third_party/xla/xla/tsl/platform/cloud/now_seconds_env.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_NOW_SECONDS_ENV_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_NOW_SECONDS_ENV_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_NOW_SECONDS_ENV_H_ +#define XLA_TSL_PLATFORM_CLOUD_NOW_SECONDS_ENV_H_ #include "tsl/platform/env.h" #include "tsl/platform/mutex.h" @@ -48,4 +48,4 @@ class NowSecondsEnv : public EnvWrapper { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_NOW_SECONDS_ENV_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_NOW_SECONDS_ENV_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/oauth_client.cc b/third_party/xla/xla/tsl/platform/cloud/oauth_client.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/oauth_client.cc rename to third_party/xla/xla/tsl/platform/cloud/oauth_client.cc index 74806805abe..e4e16ef7423 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/oauth_client.cc +++ b/third_party/xla/xla/tsl/platform/cloud/oauth_client.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/oauth_client.h" +#include "xla/tsl/platform/cloud/oauth_client.h" #ifndef _WIN32 #include #include @@ -27,8 +27,8 @@ limitations under the License. #include #include #include +#include "xla/tsl/platform/cloud/curl_http_request.h" #include "tsl/platform/base64.h" -#include "tsl/platform/cloud/curl_http_request.h" #include "tsl/platform/env.h" #include "tsl/platform/errors.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/oauth_client.h b/third_party/xla/xla/tsl/platform/cloud/oauth_client.h similarity index 91% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/oauth_client.h rename to third_party/xla/xla/tsl/platform/cloud/oauth_client.h index 19d8b4fb158..409155acb0d 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/oauth_client.h +++ b/third_party/xla/xla/tsl/platform/cloud/oauth_client.h @@ -13,13 +13,13 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_OAUTH_CLIENT_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_OAUTH_CLIENT_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_OAUTH_CLIENT_H_ +#define XLA_TSL_PLATFORM_CLOUD_OAUTH_CLIENT_H_ #include #include "json/json.h" -#include "tsl/platform/cloud/http_request.h" +#include "xla/tsl/platform/cloud/http_request.h" #include "tsl/platform/env.h" #include "tsl/platform/status.h" @@ -61,4 +61,4 @@ class OAuthClient { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_OAUTH_CLIENT_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_OAUTH_CLIENT_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/oauth_client_test.cc b/third_party/xla/xla/tsl/platform/cloud/oauth_client_test.cc similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/oauth_client_test.cc rename to third_party/xla/xla/tsl/platform/cloud/oauth_client_test.cc index dc4c116583b..cd91e664910 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/oauth_client_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/oauth_client_test.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/oauth_client.h" +#include "xla/tsl/platform/cloud/oauth_client.h" #include @@ -21,8 +21,8 @@ limitations under the License. #include #include #include "xla/tsl/lib/core/status_test_util.h" +#include "xla/tsl/platform/cloud/http_request_fake.h" #include "tsl/platform/base64.h" -#include "tsl/platform/cloud/http_request_fake.h" #include "tsl/platform/env.h" #include "tsl/platform/path.h" #include "tsl/platform/scanner.h" @@ -32,7 +32,8 @@ namespace tsl { namespace { string TestData() { - return io::JoinPath(testing::TslSrcRoot(), "platform", "cloud", "testdata"); + return io::JoinPath(testing::XlaSrcRoot(), "tsl", "platform", "cloud", + "testdata"); } constexpr char kTokenJson[] = R"( diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/ram_file_block_cache.cc b/third_party/xla/xla/tsl/platform/cloud/ram_file_block_cache.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/ram_file_block_cache.cc rename to third_party/xla/xla/tsl/platform/cloud/ram_file_block_cache.cc index 57330d1ad30..50c7980e866 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/ram_file_block_cache.cc +++ b/third_party/xla/xla/tsl/platform/cloud/ram_file_block_cache.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/ram_file_block_cache.h" +#include "xla/tsl/platform/cloud/ram_file_block_cache.h" #include #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/ram_file_block_cache.h b/third_party/xla/xla/tsl/platform/cloud/ram_file_block_cache.h similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/ram_file_block_cache.h rename to third_party/xla/xla/tsl/platform/cloud/ram_file_block_cache.h index 627cf6f2c80..da204d351b5 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/ram_file_block_cache.h +++ b/third_party/xla/xla/tsl/platform/cloud/ram_file_block_cache.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_RAM_FILE_BLOCK_CACHE_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_RAM_FILE_BLOCK_CACHE_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_RAM_FILE_BLOCK_CACHE_H_ +#define XLA_TSL_PLATFORM_CLOUD_RAM_FILE_BLOCK_CACHE_H_ #include #include @@ -23,7 +23,7 @@ limitations under the License. #include #include -#include "tsl/platform/cloud/file_block_cache.h" +#include "xla/tsl/platform/cloud/file_block_cache.h" #include "tsl/platform/env.h" #include "tsl/platform/mutex.h" #include "tsl/platform/notification.h" @@ -247,4 +247,4 @@ class RamFileBlockCache : public FileBlockCache { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_RAM_FILE_BLOCK_CACHE_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_RAM_FILE_BLOCK_CACHE_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/ram_file_block_cache_test.cc b/third_party/xla/xla/tsl/platform/cloud/ram_file_block_cache_test.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/ram_file_block_cache_test.cc rename to third_party/xla/xla/tsl/platform/cloud/ram_file_block_cache_test.cc index cc716011a9b..7a6d0dd52c1 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/ram_file_block_cache_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/ram_file_block_cache_test.cc @@ -13,13 +13,13 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/ram_file_block_cache.h" +#include "xla/tsl/platform/cloud/ram_file_block_cache.h" #include #include "xla/tsl/lib/core/status_test_util.h" +#include "xla/tsl/platform/cloud/now_seconds_env.h" #include "tsl/platform/blocking_counter.h" -#include "tsl/platform/cloud/now_seconds_env.h" #include "tsl/platform/env.h" #include "tsl/platform/notification.h" #include "tsl/platform/test.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/BUILD b/third_party/xla/xla/tsl/platform/cloud/testdata/BUILD similarity index 70% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/BUILD rename to third_party/xla/xla/tsl/platform/cloud/testdata/BUILD index 08ff42cba72..8a42e4273ff 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/BUILD +++ b/third_party/xla/xla/tsl/platform/cloud/testdata/BUILD @@ -1,6 +1,6 @@ # Cloud test data files. -load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -12,7 +12,7 @@ filegroup( srcs = [ "application_default_credentials.json", ], - visibility = ["//tsl/platform/cloud:__pkg__"], + visibility = ["//xla/tsl/platform/cloud:__pkg__"], ) filegroup( @@ -20,7 +20,7 @@ filegroup( srcs = [ "service_account_credentials.json", ], - visibility = ["//tsl/platform/cloud:__pkg__"], + visibility = ["//xla/tsl/platform/cloud:__pkg__"], ) filegroup( @@ -28,5 +28,5 @@ filegroup( srcs = [ "service_account_public_key.txt", ], - visibility = ["//tsl/platform/cloud:__pkg__"], + visibility = ["//xla/tsl/platform/cloud:__pkg__"], ) diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/application_default_credentials.json b/third_party/xla/xla/tsl/platform/cloud/testdata/application_default_credentials.json similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/application_default_credentials.json rename to third_party/xla/xla/tsl/platform/cloud/testdata/application_default_credentials.json diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/service_account_credentials.json b/third_party/xla/xla/tsl/platform/cloud/testdata/service_account_credentials.json similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/service_account_credentials.json rename to third_party/xla/xla/tsl/platform/cloud/testdata/service_account_credentials.json diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/service_account_public_key.txt b/third_party/xla/xla/tsl/platform/cloud/testdata/service_account_public_key.txt similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/service_account_public_key.txt rename to third_party/xla/xla/tsl/platform/cloud/testdata/service_account_public_key.txt diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/time_util.cc b/third_party/xla/xla/tsl/platform/cloud/time_util.cc similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/time_util.cc rename to third_party/xla/xla/tsl/platform/cloud/time_util.cc index 62f8258bbf3..3950f387e72 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/time_util.cc +++ b/third_party/xla/xla/tsl/platform/cloud/time_util.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/time_util.h" +#include "xla/tsl/platform/cloud/time_util.h" #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/time_util.h b/third_party/xla/xla/tsl/platform/cloud/time_util.h similarity index 85% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/time_util.h rename to third_party/xla/xla/tsl/platform/cloud/time_util.h index 4dd2d29ff15..0b75a294bd3 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/time_util.h +++ b/third_party/xla/xla/tsl/platform/cloud/time_util.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_TIME_UTIL_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_TIME_UTIL_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_TIME_UTIL_H_ +#define XLA_TSL_PLATFORM_CLOUD_TIME_UTIL_H_ #include "tsl/platform/status.h" @@ -26,4 +26,4 @@ absl::Status ParseRfc3339Time(const string& time, int64_t* mtime_nsec); } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_TIME_UTIL_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_TIME_UTIL_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/time_util_test.cc b/third_party/xla/xla/tsl/platform/cloud/time_util_test.cc similarity index 96% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/time_util_test.cc rename to third_party/xla/xla/tsl/platform/cloud/time_util_test.cc index 6b54787f6bd..9cb6f22dfeb 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/time_util_test.cc +++ b/third_party/xla/xla/tsl/platform/cloud/time_util_test.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/cloud/time_util.h" +#include "xla/tsl/platform/cloud/time_util.h" #include "xla/tsl/lib/core/status_test_util.h" #include "tsl/platform/test.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/zone_provider.h b/third_party/xla/xla/tsl/platform/cloud/zone_provider.h similarity index 89% rename from third_party/xla/third_party/tsl/tsl/platform/cloud/zone_provider.h rename to third_party/xla/xla/tsl/platform/cloud/zone_provider.h index 14b64ea9955..c54b2f84a84 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/zone_provider.h +++ b/third_party/xla/xla/tsl/platform/cloud/zone_provider.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_ZONE_PROVIDER_H_ -#define TENSORFLOW_TSL_PLATFORM_CLOUD_ZONE_PROVIDER_H_ +#ifndef XLA_TSL_PLATFORM_CLOUD_ZONE_PROVIDER_H_ +#define XLA_TSL_PLATFORM_CLOUD_ZONE_PROVIDER_H_ #include @@ -46,4 +46,4 @@ class ZoneProvider { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_CLOUD_ZONE_PROVIDER_H_ +#endif // XLA_TSL_PLATFORM_CLOUD_ZONE_PROVIDER_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/BUILD b/third_party/xla/xla/tsl/platform/default/BUILD similarity index 59% rename from third_party/xla/third_party/tsl/tsl/platform/default/BUILD rename to third_party/xla/xla/tsl/platform/default/BUILD index bcddadc908c..82ae77ad275 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/BUILD +++ b/third_party/xla/xla/tsl/platform/default/BUILD @@ -2,7 +2,7 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load( - "@local_xla//xla/tsl:tsl.bzl", + "//xla/tsl:tsl.bzl", "if_cuda_tools", "if_not_fuchsia", "if_not_windows", @@ -10,14 +10,14 @@ load( "internal_visibility", "tsl_copts", ) -load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup", "tsl_grpc_cc_dependencies") +load("//xla/tsl:tsl.default.bzl", "filegroup", "tsl_grpc_cc_dependencies") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], default_visibility = internal_visibility([ "//tensorflow/core/lib/jpeg:__pkg__", "//tensorflow/core/platform:__pkg__", - "//tsl/platform:__pkg__", + "@local_tsl//tsl/platform:__pkg__", ]), licenses = ["notice"], ) @@ -34,7 +34,7 @@ cc_library( cc_library( name = "context", - hdrs = ["//tsl/platform:context.h"], + hdrs = ["@local_tsl//tsl/platform:context.h"], tags = [ "manual", "no_oss", @@ -42,23 +42,24 @@ cc_library( ], textual_hdrs = ["context.h"], deps = [ - "//tsl/platform", + "@local_tsl//tsl/platform", ], ) cc_library( name = "criticality", - hdrs = ["//tsl/platform:criticality.h"], + hdrs = ["@local_tsl//tsl/platform:criticality.h"], + tags = ["manual"], textual_hdrs = ["criticality.h"], deps = [ - "//tsl/platform", + "@local_tsl//tsl/platform", ], ) cc_library( name = "cuda_root_path", srcs = ["cuda_root_path.cc"], - hdrs = ["//tsl/platform:cuda_root_path.h"], + hdrs = ["@local_tsl//tsl/platform:cuda_root_path.h"], compatible_with = [], data = if_cuda_tools([ "@cuda_nvcc//:nvvm", @@ -69,12 +70,12 @@ cc_library( "nobuilder", ], deps = [ - "//tsl/platform", - "//tsl/platform:env", - "//tsl/platform:logging", - "//tsl/platform:path", - "//tsl/platform:types", "@local_config_cuda//cuda:cuda_headers", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:path", + "@local_tsl//tsl/platform:types", ], ) @@ -82,7 +83,7 @@ cc_library( name = "dso_loader", srcs = ["dso_loader.cc"] + select({ # include dynamic loading checker only for open source build - "@local_xla//xla/tsl:oss": ["dlopen_checker.cc"], + "//xla/tsl:oss": ["dlopen_checker.cc"], "//conditions:default": ["dlopen_checker_stub.cc"], }), hdrs = ["dso_loader.h"], @@ -93,9 +94,6 @@ cc_library( "nobuilder", ], deps = [ - "//tsl/platform:load_library", - "//tsl/platform:logging", - "//tsl/platform:path", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", @@ -103,6 +101,9 @@ cc_library( "@local_config_cuda//cuda:cuda_headers", "@local_config_rocm//rocm:rocm_headers", "@local_config_tensorrt//:tensorrt_headers", + "@local_tsl//tsl/platform:load_library", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:path", ] + if_oss(["@local_config_nccl//:nccl_config"]), ) @@ -110,18 +111,18 @@ cc_library( name = "env", srcs = [ "posix_file_system.cc", - "//tsl/platform:env.cc", - "//tsl/platform:file_system.cc", - "//tsl/platform:file_system_helper.cc", - "//tsl/platform:threadpool.cc", + "@local_tsl//tsl/platform:env.cc", + "@local_tsl//tsl/platform:file_system.cc", + "@local_tsl//tsl/platform:file_system_helper.cc", + "@local_tsl//tsl/platform:threadpool.cc", ], hdrs = [ "posix_file_system.h", - "//tsl/platform:env.h", - "//tsl/platform:file_system.h", - "//tsl/platform:file_system_helper.h", - "//tsl/platform:ram_file_system.h", - "//tsl/platform:threadpool.h", + "@local_tsl//tsl/platform:env.h", + "@local_tsl//tsl/platform:file_system.h", + "@local_tsl//tsl/platform:file_system_helper.h", + "@local_tsl//tsl/platform:ram_file_system.h", + "@local_tsl//tsl/platform:threadpool.h", ], copts = tsl_copts(), tags = [ @@ -130,39 +131,39 @@ cc_library( "nobuilder", ], deps = [ - "//tsl/platform", - "//tsl/platform:blocking_counter", - "//tsl/platform:context", - "//tsl/platform:cord", - "//tsl/platform:denormal", - "//tsl/platform:env_time", - "//tsl/platform:errors", - "//tsl/platform:file_statistics", - "//tsl/platform:load_library", - "//tsl/platform:logging", - "//tsl/platform:macros", - "//tsl/platform:mutex", - "//tsl/platform:path", - "//tsl/platform:platform_port", - "//tsl/platform:protobuf", - "//tsl/platform:regexp", - "//tsl/platform:scanner", - "//tsl/platform:setround", - "//tsl/platform:status", - "//tsl/platform:statusor", - "//tsl/platform:str_util", - "//tsl/platform:strcat", - "//tsl/platform:stringpiece", - "//tsl/platform:stringprintf", - "//tsl/platform:threadpool_interface", - "//tsl/platform:tracing", - "//tsl/platform:types", + "//xla/tsl/protobuf:error_codes_proto_impl_cc", "@com_google_absl//absl/functional:any_invocable", "@com_google_absl//absl/strings", "@com_google_absl//absl/time", "@com_google_absl//absl/types:optional", "@eigen_archive//:eigen3", - "@local_xla//xla/tsl/protobuf:error_codes_proto_impl_cc", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:blocking_counter", + "@local_tsl//tsl/platform:context", + "@local_tsl//tsl/platform:cord", + "@local_tsl//tsl/platform:denormal", + "@local_tsl//tsl/platform:env_time", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:file_statistics", + "@local_tsl//tsl/platform:load_library", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:path", + "@local_tsl//tsl/platform:platform_port", + "@local_tsl//tsl/platform:protobuf", + "@local_tsl//tsl/platform:regexp", + "@local_tsl//tsl/platform:scanner", + "@local_tsl//tsl/platform:setround", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:statusor", + "@local_tsl//tsl/platform:str_util", + "@local_tsl//tsl/platform:strcat", + "@local_tsl//tsl/platform:stringpiece", + "@local_tsl//tsl/platform:stringprintf", + "@local_tsl//tsl/platform:threadpool_interface", + "@local_tsl//tsl/platform:tracing", + "@local_tsl//tsl/platform:types", ], ) @@ -178,30 +179,30 @@ cc_library( ], deps = [ ":env", - "//tsl/platform:load_library", - "//tsl/platform:logging", - "//tsl/platform:mutex", - "//tsl/platform:strcat", - "@local_xla//xla/tsl/protobuf:error_codes_proto_impl_cc", + "//xla/tsl/protobuf:error_codes_proto_impl_cc", + "@local_tsl//tsl/platform:load_library", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:strcat", ], ) cc_library( name = "env_time", srcs = ["env_time.cc"], - hdrs = ["//tsl/platform:env_time.h"], + hdrs = ["@local_tsl//tsl/platform:env_time.h"], tags = [ "manual", "no_oss", "nobuilder", ], - deps = ["//tsl/platform:types"], + deps = ["@local_tsl//tsl/platform:types"], ) cc_library( name = "error_logging", srcs = ["error_logging.cc"], - hdrs = ["//tsl/platform:error_logging.h"], + hdrs = ["@local_tsl//tsl/platform:error_logging.h"], tags = [ "manual", "no_oss", @@ -216,42 +217,42 @@ cc_library( cc_library( name = "grpc_credentials", srcs = ["grpc_credentials.cc"], - hdrs = ["//tsl/platform:grpc_credentials.h"], + hdrs = ["@local_tsl//tsl/platform:grpc_credentials.h"], tags = [ "manual", "no_oss", "nobuilder", ], deps = [ - "//tsl/platform:logging", "@com_google_absl//absl/log:check", + "@local_tsl//tsl/platform:logging", ] + tsl_grpc_cc_dependencies(), ) cc_library( name = "human_readable_json", srcs = ["human_readable_json.cc"], - hdrs = ["//tsl/platform:human_readable_json.h"], + hdrs = ["@local_tsl//tsl/platform:human_readable_json.h"], tags = [ "manual", "no_oss", "nobuilder", ], deps = [ - "//tsl/platform:errors", - "//tsl/platform:protobuf", - "//tsl/platform:strcat", - "//tsl/platform:stringpiece", - "//tsl/platform:types", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:protobuf", + "@local_tsl//tsl/platform:strcat", + "@local_tsl//tsl/platform:stringpiece", + "@local_tsl//tsl/platform:types", ], ) cc_library( name = "load_library", srcs = ["load_library.cc"], - hdrs = ["//tsl/platform:load_library.h"], + hdrs = ["@local_tsl//tsl/platform:load_library.h"], tags = [ "manual", "no_oss", @@ -265,7 +266,7 @@ cc_library( cc_library( name = "logging", srcs = ["logging.cc"], - hdrs = ["//tsl/platform:logging.h"], + hdrs = ["@local_tsl//tsl/platform:logging.h"], tags = [ "manual", "no_oss", @@ -273,14 +274,14 @@ cc_library( ], textual_hdrs = ["logging.h"], deps = [ - "//tsl/platform", - "//tsl/platform:env_time", - "//tsl/platform:macros", - "//tsl/platform:mutex", - "//tsl/platform:types", "@com_google_absl//absl/base", "@com_google_absl//absl/base:log_severity", "@com_google_absl//absl/strings", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:env_time", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:types", ], ) @@ -296,7 +297,7 @@ cc_library( srcs = [ "mutex.cc", "mutex_data.h", - "//tsl/platform:mutex.h", + "@local_tsl//tsl/platform:mutex.h", ], tags = [ "manual", @@ -305,9 +306,9 @@ cc_library( ], textual_hdrs = ["mutex.h"], deps = [ - "//tsl/platform", - "//tsl/platform:macros", - "//tsl/platform:thread_annotations", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:thread_annotations", "@nsync//:nsync_cpp", ], ) @@ -316,7 +317,7 @@ cc_library( name = "net", srcs = ["net.cc"], hdrs = [ - "//tsl/platform:net.h", + "@local_tsl//tsl/platform:net.h", ], tags = [ "manual", @@ -324,8 +325,8 @@ cc_library( "nobuilder", ], deps = [ - "//tsl/platform:logging", - "//tsl/platform:strcat", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:strcat", ], alwayslink = True, ) @@ -334,22 +335,22 @@ cc_library( name = "platform_port", srcs = [ "port.cc", - "//tsl/platform:cpu_info.cc", + "@local_tsl//tsl/platform:cpu_info.cc", ], hdrs = [ - "//tsl/platform:cpu_info.h", - "//tsl/platform:demangle.h", - "//tsl/platform:host_info.h", - "//tsl/platform:init_main.h", - "//tsl/platform:mem.h", - "//tsl/platform:numa.h", - "//tsl/platform:snappy.h", - "//tsl/platform/profile_utils:cpu_utils.h", + "@local_tsl//tsl/platform:cpu_info.h", + "@local_tsl//tsl/platform:demangle.h", + "@local_tsl//tsl/platform:host_info.h", + "@local_tsl//tsl/platform:init_main.h", + "@local_tsl//tsl/platform:mem.h", + "@local_tsl//tsl/platform:numa.h", + "@local_tsl//tsl/platform:snappy.h", + "@local_tsl//tsl/platform/profile_utils:cpu_utils.h", ], copts = tsl_copts(), defines = ["TF_USE_SNAPPY"] + select({ # TF Additional NUMA defines - "@local_xla//xla/tsl:with_numa_support": ["TENSORFLOW_USE_NUMA"], + "//xla/tsl:with_numa_support": ["TENSORFLOW_USE_NUMA"], "//conditions:default": [], }), tags = [ @@ -358,18 +359,18 @@ cc_library( "nobuilder", ], deps = [ - "//tsl/platform", - "//tsl/platform:byte_order", - "//tsl/platform:dynamic_annotations", - "//tsl/platform:logging", - "//tsl/platform:macros", - "//tsl/platform:types", - "//tsl/platform/profile_utils:profile_utils_cpu_utils", "@com_google_absl//absl/base", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:byte_order", + "@local_tsl//tsl/platform:dynamic_annotations", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:types", + "@local_tsl//tsl/platform/profile_utils:profile_utils_cpu_utils", "@snappy", ] + select({ # TF Additional NUMA dependencies - "@local_xla//xla/tsl:with_numa_support": [ + "//xla/tsl:with_numa_support": [ # Don't merge in a single line "@hwloc", ], @@ -380,21 +381,21 @@ cc_library( cc_library( name = "resource", srcs = ["resource.cc"], - hdrs = ["//tsl/platform:resource.h"], + hdrs = ["@local_tsl//tsl/platform:resource.h"], tags = [ "manual", "no_oss", "nobuilder", ], deps = [ - "//tsl/platform:stringpiece", + "@local_tsl//tsl/platform:stringpiece", ], ) cc_library( name = "rocm_rocdl_path", srcs = ["rocm_rocdl_path.cc"], - hdrs = ["//tsl/platform:rocm_rocdl_path.h"], + hdrs = ["@local_tsl//tsl/platform:rocm_rocdl_path.h"], compatible_with = [], tags = [ "manual", @@ -402,10 +403,10 @@ cc_library( "nobuilder", ], deps = [ - "//tsl/platform:logging", - "//tsl/platform:path", - "//tsl/platform:types", "@local_config_rocm//rocm:rocm_headers", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:path", + "@local_tsl//tsl/platform:types", ], ) @@ -414,19 +415,19 @@ cc_library( hdrs = ["stacktrace.h"], linkopts = ["-ldl"], deps = [ - "//tsl/platform", - "//tsl/platform:abi", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:abi", ], ) cc_library( name = "stacktrace_handler", srcs = ["stacktrace_handler.cc"], - hdrs = ["//tsl/platform:stacktrace_handler_hdrs"], + hdrs = ["@local_tsl//tsl/platform:stacktrace_handler_hdrs"], linkstatic = 1, deps = [ - "//tsl/platform", - "//tsl/platform:stacktrace", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:stacktrace", ], alwayslink = 1, ) @@ -434,7 +435,7 @@ cc_library( cc_library( name = "subprocess", srcs = ["subprocess.cc"], - hdrs = ["//tsl/platform:subprocess.h"], + hdrs = ["@local_tsl//tsl/platform:subprocess.h"], tags = [ "manual", "no_oss", @@ -442,11 +443,11 @@ cc_library( ], textual_hdrs = ["subprocess.h"], deps = [ - "//tsl/platform", - "//tsl/platform:logging", - "//tsl/platform:macros", - "//tsl/platform:mutex", - "//tsl/platform:types", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:types", ], alwayslink = True, ) @@ -455,9 +456,9 @@ cc_library( name = "tracing", srcs = [ "tracing.cc", - "//tsl/platform:tracing.cc", + "@local_tsl//tsl/platform:tracing.cc", ], - hdrs = ["//tsl/platform:tracing.h"], + hdrs = ["@local_tsl//tsl/platform:tracing.h"], tags = [ "manual", "no_oss", @@ -465,15 +466,15 @@ cc_library( ], textual_hdrs = ["tracing_impl.h"], deps = [ - "//tsl/platform", - "//tsl/platform:hash", - "//tsl/platform:logging", - "//tsl/platform:macros", - "//tsl/platform:str_util", - "//tsl/platform:strcat", - "//tsl/platform:stringpiece", - "//tsl/platform:types", - "@local_xla//xla/tsl/profiler/backends/cpu:threadpool_listener_state", + "//xla/tsl/profiler/backends/cpu:threadpool_listener_state", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:hash", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:str_util", + "@local_tsl//tsl/platform:strcat", + "@local_tsl//tsl/platform:stringpiece", + "@local_tsl//tsl/platform:types", ], alwayslink = True, ) @@ -498,11 +499,11 @@ cc_library( "nobuilder", ], deps = [ - "//tsl/platform:env", - "//tsl/platform:mutex", - "//tsl/platform:notification", - "//tsl/platform:platform_port", "@com_google_absl//absl/memory", + "@local_tsl//tsl/platform:env", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:notification", + "@local_tsl//tsl/platform:platform_port", ], ) @@ -511,7 +512,7 @@ cc_library( srcs = [ "crash_analysis.cc", ], - hdrs = ["//tsl/platform:crash_analysis.h"], + hdrs = ["@local_tsl//tsl/platform:crash_analysis.h"], tags = [ "manual", "no_oss", @@ -520,8 +521,8 @@ cc_library( textual_hdrs = ["crash_analysis.h"], visibility = internal_visibility(["//tensorflow:__subpackages__"]), deps = [ - "//tsl/platform", - "//tsl/platform:protobuf", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:protobuf", ], ) @@ -546,9 +547,9 @@ cc_library( textual_hdrs = ["statusor.h"], visibility = internal_visibility(["//tensorflow:__subpackages__"]), deps = [ - "//tsl/platform:macros", - "//tsl/platform:status", "@com_google_absl//absl/status:statusor", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:status", ], ) @@ -573,7 +574,7 @@ bzl_library( name = "build_config_root_bzl", srcs = ["build_config_root.bzl"], # copybara:uncomment parse_tests = False, - deps = ["//third_party/py/rules_pywrap:pywrap_bzl"], + deps = ["@local_tsl//third_party/py/rules_pywrap:pywrap_bzl"], ) # Export source files needed for mobile builds, which do not use granular targets. @@ -597,12 +598,12 @@ filegroup( "status.h", "statusor.h", "tracing_impl.h", - "//tsl/platform/profile_utils:cpu_utils.h", - "//tsl/platform/profile_utils:i_cpu_utils_helper.h", + "@local_tsl//tsl/platform/profile_utils:cpu_utils.h", + "@local_tsl//tsl/platform/profile_utils:i_cpu_utils_helper.h", ], visibility = internal_visibility([ "//tensorflow/core/platform:__pkg__", - "//tsl/platform:__pkg__", + "@local_tsl//tsl/platform:__pkg__", ]), ) diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl b/third_party/xla/xla/tsl/platform/default/build_config.bzl similarity index 93% rename from third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl rename to third_party/xla/xla/tsl/platform/default/build_config.bzl index 79def2b1cdf..f2a983ec314 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl +++ b/third_party/xla/xla/tsl/platform/default/build_config.bzl @@ -2,14 +2,14 @@ load("@com_github_grpc_grpc//bazel:generate_cc.bzl", "generate_cc") load("@com_google_protobuf//:protobuf.bzl", "proto_gen") +load("@local_tsl//third_party/py/rules_pywrap:pywrap.bzl", "use_pywrap_rules") +load("@local_tsl//tsl/platform:build_config_root.bzl", "if_static") load( "@local_xla//xla/tsl:tsl.bzl", "clean_dep", "if_not_windows", "if_tsl_link_protobuf", ) -load("//third_party/py/rules_pywrap:pywrap.bzl", "use_pywrap_rules") -load("//tsl/platform:build_config_root.bzl", "if_static") def well_known_proto_libs(): """Set of standard protobuf protos, like Any and Timestamp. @@ -679,29 +679,29 @@ def tf_proto_library( def tf_additional_lib_hdrs(): return [ - clean_dep("//tsl/platform/default:casts.h"), - clean_dep("//tsl/platform/default:context.h"), - clean_dep("//tsl/platform/default:criticality.h"), - clean_dep("//tsl/platform/default:integral_types.h"), - clean_dep("//tsl/platform/default:logging.h"), - clean_dep("//tsl/platform/default:mutex.h"), - clean_dep("//tsl/platform/default:mutex_data.h"), - clean_dep("//tsl/platform/default:stacktrace.h"), - clean_dep("//tsl/platform/default:status.h"), - clean_dep("//tsl/platform/default:statusor.h"), - clean_dep("//tsl/platform/default:tracing_impl.h"), - clean_dep("//tsl/platform/default:unbounded_work_queue.h"), + clean_dep("//xla/tsl/platform/default:casts.h"), + clean_dep("//xla/tsl/platform/default:context.h"), + clean_dep("//xla/tsl/platform/default:criticality.h"), + clean_dep("//xla/tsl/platform/default:integral_types.h"), + clean_dep("//xla/tsl/platform/default:logging.h"), + clean_dep("//xla/tsl/platform/default:mutex.h"), + clean_dep("//xla/tsl/platform/default:mutex_data.h"), + clean_dep("//xla/tsl/platform/default:stacktrace.h"), + clean_dep("//xla/tsl/platform/default:status.h"), + clean_dep("//xla/tsl/platform/default:statusor.h"), + clean_dep("//xla/tsl/platform/default:tracing_impl.h"), + clean_dep("//xla/tsl/platform/default:unbounded_work_queue.h"), ] + select({ clean_dep("@local_xla//xla/tsl:windows"): [ - clean_dep("//tsl/platform/windows:intrinsics_port.h"), - clean_dep("//tsl/platform/windows:stacktrace.h"), - clean_dep("//tsl/platform/windows:subprocess.h"), - clean_dep("//tsl/platform/windows:wide_char.h"), - clean_dep("//tsl/platform/windows:windows_file_system.h"), + clean_dep("//xla/tsl/platform/windows:intrinsics_port.h"), + clean_dep("//xla/tsl/platform/windows:stacktrace.h"), + clean_dep("//xla/tsl/platform/windows:subprocess.h"), + clean_dep("//xla/tsl/platform/windows:wide_char.h"), + clean_dep("//xla/tsl/platform/windows:windows_file_system.h"), ], "//conditions:default": [ - clean_dep("//tsl/platform/default:posix_file_system.h"), - clean_dep("//tsl/platform/default:subprocess.h"), + clean_dep("//xla/tsl/platform/default:posix_file_system.h"), + clean_dep("//xla/tsl/platform/default:subprocess.h"), ], }) @@ -751,7 +751,7 @@ def tf_additional_core_deps(): clean_dep("@local_xla//xla/tsl:ios"): [], clean_dep("@local_xla//xla/tsl:linux_s390x"): [], "//conditions:default": [ - clean_dep("//tsl/platform/cloud:gcs_file_system"), + clean_dep("@local_xla//xla/tsl/platform/cloud:gcs_file_system"), ], }) @@ -836,33 +836,33 @@ def tf_protobuf_compiler_deps(): def tf_windows_aware_platform_deps(name): return select({ clean_dep("@local_xla//xla/tsl:windows"): [ - clean_dep("//tsl/platform/windows:" + name), + clean_dep("@local_xla//xla/tsl/platform/windows:" + name), ], "//conditions:default": [ - clean_dep("//tsl/platform/default:" + name), + clean_dep("//xla/tsl/platform/default:" + name), ], }) -def tf_platform_deps(name, platform_dir = "@local_tsl//tsl/platform/"): +def tf_platform_deps(name, platform_dir = "@local_xla//xla/tsl/platform/"): return [platform_dir + "default:" + name] -def tf_stream_executor_deps(name, platform_dir = "@local_tsl//tsl/platform/"): +def tf_stream_executor_deps(name, platform_dir = "@local_xla//xla/tsl/platform/"): return tf_platform_deps(name, platform_dir) -def tf_platform_alias(name, platform_dir = "@local_tsl//tsl/platform/"): +def tf_platform_alias(name, platform_dir = "@local_xla//xla/tsl/platform/"): return [platform_dir + "default:" + name] def tf_logging_deps(): - return [clean_dep("//tsl/platform/default:logging")] + return [clean_dep("//xla/tsl/platform/default:logging")] def tf_error_logging_deps(): - return [clean_dep("//tsl/platform/default:error_logging")] + return [clean_dep("//xla/tsl/platform/default:error_logging")] def tsl_grpc_credentials_deps(): - return [clean_dep("//tsl/platform/default:grpc_credentials")] + return [clean_dep("//xla/tsl/platform/default:grpc_credentials")] def tf_resource_deps(): - return [clean_dep("//tsl/platform/default:resource")] + return [clean_dep("//xla/tsl/platform/default:resource")] def tf_portable_deps_no_runtime(): return [ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/build_config_root.bzl b/third_party/xla/xla/tsl/platform/default/build_config_root.bzl similarity index 77% rename from third_party/xla/third_party/tsl/tsl/platform/default/build_config_root.bzl rename to third_party/xla/xla/tsl/platform/default/build_config_root.bzl index 05559211a93..c26b0681e03 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/build_config_root.bzl +++ b/third_party/xla/xla/tsl/platform/default/build_config_root.bzl @@ -3,7 +3,7 @@ # be separate to avoid cyclic references. load("@local_config_remote_execution//:remote_execution.bzl", "gpu_test_tags") -load("//third_party/py/rules_pywrap:pywrap.bzl", "use_pywrap_rules") +load("@local_tsl//third_party/py/rules_pywrap:pywrap.bzl", "use_pywrap_rules") # RBE settings for tests that require a GPU. This is used in exec_properties of rules # that need GPU access. @@ -51,11 +51,11 @@ def if_static(extra_deps, otherwise = [], macos = []): return extra_deps ret = { - str(Label("@local_xla//xla/tsl:framework_shared_object")): otherwise, + str(Label("//xla/tsl:framework_shared_object")): otherwise, "//conditions:default": extra_deps, } if macos: - ret[str(Label("@local_xla//xla/tsl:macos_with_framework_shared_object"))] = macos + ret[str(Label("//xla/tsl:macos_with_framework_shared_object"))] = macos return select(ret) # TODO(b/356020232): remove completely after migration is done @@ -64,9 +64,9 @@ def if_static_and_not_mobile(extra_deps, otherwise = []): return extra_deps return select({ - str(Label("@local_xla//xla/tsl:framework_shared_object")): otherwise, - str(Label("@local_xla//xla/tsl:android")): otherwise, - str(Label("@local_xla//xla/tsl:ios")): otherwise, + str(Label("//xla/tsl:framework_shared_object")): otherwise, + str(Label("//xla/tsl:android")): otherwise, + str(Label("//xla/tsl:ios")): otherwise, "//conditions:default": extra_deps, }) @@ -76,19 +76,19 @@ def if_pywrap(if_true = [], if_false = []): def if_llvm_aarch32_available(then, otherwise = []): return select({ - str(Label("@local_xla//xla/tsl:aarch32_or_cross")): then, + str(Label("//xla/tsl:aarch32_or_cross")): then, "//conditions:default": otherwise, }) def if_llvm_aarch64_available(then, otherwise = []): return select({ - str(Label("@local_xla//xla/tsl:aarch64_or_cross")): then, + str(Label("//xla/tsl:aarch64_or_cross")): then, "//conditions:default": otherwise, }) def if_llvm_arm_available(then, otherwise = []): return select({ - str(Label("@local_xla//xla/tsl:arm_or_cross")): then, + str(Label("//xla/tsl:arm_or_cross")): then, "//conditions:default": otherwise, }) @@ -97,18 +97,18 @@ def if_llvm_hexagon_available(then, otherwise = []): def if_llvm_powerpc_available(then, otherwise = []): return select({ - str(Label("@local_xla//xla/tsl:ppc64le_or_cross")): then, + str(Label("//xla/tsl:ppc64le_or_cross")): then, "//conditions:default": otherwise, }) def if_llvm_system_z_available(then, otherwise = []): return select({ - str(Label("@local_xla//xla/tsl:s390x_or_cross")): then, + str(Label("//xla/tsl:s390x_or_cross")): then, "//conditions:default": otherwise, }) def if_llvm_x86_available(then, otherwise = []): return select({ - str(Label("@local_xla//xla/tsl:x86_or_cross")): then, + str(Label("//xla/tsl:x86_or_cross")): then, "//conditions:default": otherwise, }) diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/casts.h b/third_party/xla/xla/tsl/platform/default/casts.h similarity index 96% rename from third_party/xla/third_party/tsl/tsl/platform/default/casts.h rename to third_party/xla/xla/tsl/platform/default/casts.h index 69d468bb1bf..600d40bd495 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/casts.h +++ b/third_party/xla/xla/tsl/platform/default/casts.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_CASTS_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_CASTS_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_CASTS_H_ +#define XLA_TSL_PLATFORM_DEFAULT_CASTS_H_ #include // for use with down_cast<> @@ -93,4 +93,4 @@ namespace tsl { using ::tensorflow::down_cast; } -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_CASTS_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_CASTS_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/context.h b/third_party/xla/xla/tsl/platform/default/context.h similarity index 85% rename from third_party/xla/third_party/tsl/tsl/platform/default/context.h rename to third_party/xla/xla/tsl/platform/default/context.h index df75d22e5ec..8f1b36ee07b 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/context.h +++ b/third_party/xla/xla/tsl/platform/default/context.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_CONTEXT_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_CONTEXT_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_CONTEXT_H_ +#define XLA_TSL_PLATFORM_DEFAULT_CONTEXT_H_ namespace tsl { @@ -34,4 +34,4 @@ class WithContext { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_CONTEXT_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_CONTEXT_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/crash_analysis.cc b/third_party/xla/xla/tsl/platform/default/crash_analysis.cc similarity index 95% rename from third_party/xla/third_party/tsl/tsl/platform/default/crash_analysis.cc rename to third_party/xla/xla/tsl/platform/default/crash_analysis.cc index 516e6d54a0b..e7cacf673bf 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/crash_analysis.cc +++ b/third_party/xla/xla/tsl/platform/default/crash_analysis.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/default/crash_analysis.h" +#include "xla/tsl/platform/default/crash_analysis.h" #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/crash_analysis.h b/third_party/xla/xla/tsl/platform/default/crash_analysis.h similarity index 90% rename from third_party/xla/third_party/tsl/tsl/platform/default/crash_analysis.h rename to third_party/xla/xla/tsl/platform/default/crash_analysis.h index 09c33a824d0..f374c874abf 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/crash_analysis.h +++ b/third_party/xla/xla/tsl/platform/default/crash_analysis.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_CRASH_ANALYSIS_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_CRASH_ANALYSIS_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_CRASH_ANALYSIS_H_ +#define XLA_TSL_PLATFORM_DEFAULT_CRASH_ANALYSIS_H_ #include @@ -45,4 +45,4 @@ void ReportEvent(const std::string& event_name, const std::string& message, } // namespace crash_analysis } // namespace tensorflow -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_CRASH_ANALYSIS_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_CRASH_ANALYSIS_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/criticality.h b/third_party/xla/xla/tsl/platform/default/criticality.h similarity index 84% rename from third_party/xla/third_party/tsl/tsl/platform/default/criticality.h rename to third_party/xla/xla/tsl/platform/default/criticality.h index e6a93e3c836..469a6613571 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/criticality.h +++ b/third_party/xla/xla/tsl/platform/default/criticality.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_CRITICALITY_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_CRITICALITY_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_CRITICALITY_H_ +#define XLA_TSL_PLATFORM_DEFAULT_CRITICALITY_H_ namespace tsl { @@ -29,4 +29,4 @@ inline Criticality GetCriticality() { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_CRITICALITY_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_CRITICALITY_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/cuda_build_defs.bzl b/third_party/xla/xla/tsl/platform/default/cuda_build_defs.bzl similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/cuda_build_defs.bzl rename to third_party/xla/xla/tsl/platform/default/cuda_build_defs.bzl diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/cuda_root_path.cc b/third_party/xla/xla/tsl/platform/default/cuda_root_path.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/cuda_root_path.cc rename to third_party/xla/xla/tsl/platform/default/cuda_root_path.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/dlopen_checker.cc b/third_party/xla/xla/tsl/platform/default/dlopen_checker.cc similarity index 98% rename from third_party/xla/third_party/tsl/tsl/platform/default/dlopen_checker.cc rename to third_party/xla/xla/tsl/platform/default/dlopen_checker.cc index da840d61536..8e0bdddc701 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/dlopen_checker.cc +++ b/third_party/xla/xla/tsl/platform/default/dlopen_checker.cc @@ -15,7 +15,7 @@ limitations under the License. #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" -#include "tsl/platform/default/dso_loader.h" +#include "xla/tsl/platform/default/dso_loader.h" #include "tsl/platform/logging.h" namespace tsl { diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/dlopen_checker_stub.cc b/third_party/xla/xla/tsl/platform/default/dlopen_checker_stub.cc similarity index 95% rename from third_party/xla/third_party/tsl/tsl/platform/default/dlopen_checker_stub.cc rename to third_party/xla/xla/tsl/platform/default/dlopen_checker_stub.cc index 67f73430283..504c35f44ff 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/dlopen_checker_stub.cc +++ b/third_party/xla/xla/tsl/platform/default/dlopen_checker_stub.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #include "absl/status/status.h" -#include "tsl/platform/default/dso_loader.h" +#include "xla/tsl/platform/default/dso_loader.h" #include "tsl/platform/logging.h" namespace tsl { diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/dso_loader.cc b/third_party/xla/xla/tsl/platform/default/dso_loader.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/default/dso_loader.cc rename to third_party/xla/xla/tsl/platform/default/dso_loader.cc index 8c59f439ccc..0d246cb84cd 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/dso_loader.cc +++ b/third_party/xla/xla/tsl/platform/default/dso_loader.cc @@ -12,7 +12,7 @@ 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. ==============================================================================*/ -#include "tsl/platform/default/dso_loader.h" +#include "xla/tsl/platform/default/dso_loader.h" #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/dso_loader.h b/third_party/xla/xla/tsl/platform/default/dso_loader.h similarity index 95% rename from third_party/xla/third_party/tsl/tsl/platform/default/dso_loader.h rename to third_party/xla/xla/tsl/platform/default/dso_loader.h index 6f72484d504..c74cb01d2ae 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/dso_loader.h +++ b/third_party/xla/xla/tsl/platform/default/dso_loader.h @@ -16,8 +16,8 @@ limitations under the License. // Common DSO loading functionality: exposes callables that dlopen DSOs // in either the runfiles directories -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_DSO_LOADER_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_DSO_LOADER_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_DSO_LOADER_H_ +#define XLA_TSL_PLATFORM_DEFAULT_DSO_LOADER_H_ #include "absl/status/status.h" #include "absl/status/statusor.h" @@ -92,4 +92,4 @@ absl::StatusOr GetHipDsoHandle(); } // namespace internal } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_DSO_LOADER_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_DSO_LOADER_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/env.cc b/third_party/xla/xla/tsl/platform/default/env.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/default/env.cc rename to third_party/xla/xla/tsl/platform/default/env.cc index e91c35454f8..6d7e2f08ea6 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/env.cc +++ b/third_party/xla/xla/tsl/platform/default/env.cc @@ -35,8 +35,8 @@ limitations under the License. #include #include +#include "xla/tsl/platform/default/posix_file_system.h" #include "xla/tsl/protobuf/error_codes.pb.h" -#include "tsl/platform/default/posix_file_system.h" #include "tsl/platform/env.h" #include "tsl/platform/load_library.h" #include "tsl/platform/logging.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/env_time.cc b/third_party/xla/xla/tsl/platform/default/env_time.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/env_time.cc rename to third_party/xla/xla/tsl/platform/default/env_time.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/error_logging.cc b/third_party/xla/xla/tsl/platform/default/error_logging.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/error_logging.cc rename to third_party/xla/xla/tsl/platform/default/error_logging.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/grpc_credentials.cc b/third_party/xla/xla/tsl/platform/default/grpc_credentials.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/grpc_credentials.cc rename to third_party/xla/xla/tsl/platform/default/grpc_credentials.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/human_readable_json.cc b/third_party/xla/xla/tsl/platform/default/human_readable_json.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/human_readable_json.cc rename to third_party/xla/xla/tsl/platform/default/human_readable_json.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/integral_types.h b/third_party/xla/xla/tsl/platform/default/integral_types.h similarity index 81% rename from third_party/xla/third_party/tsl/tsl/platform/default/integral_types.h rename to third_party/xla/xla/tsl/platform/default/integral_types.h index 6f2f4c560ca..0827b917369 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/integral_types.h +++ b/third_party/xla/xla/tsl/platform/default/integral_types.h @@ -13,12 +13,12 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ +#define XLA_TSL_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ #include -// IWYU pragma: private, include "tsl/platform/types.h" +// IWYU pragma: private, include "third_party/tensorflow/tsl/platform/types.h" // IWYU pragma: friend third_party/tensorflow/tsl/platform/types.h namespace tsl { @@ -35,4 +35,4 @@ typedef std::uint64_t uint64; } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/load_library.cc b/third_party/xla/xla/tsl/platform/default/load_library.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/load_library.cc rename to third_party/xla/xla/tsl/platform/default/load_library.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/logging.cc b/third_party/xla/xla/tsl/platform/default/logging.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/default/logging.cc rename to third_party/xla/xla/tsl/platform/default/logging.cc index 735528777f8..a6ebc688c79 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/logging.cc +++ b/third_party/xla/xla/tsl/platform/default/logging.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/default/logging.h" +#include "xla/tsl/platform/default/logging.h" // TODO(b/142492876): Avoid depending on absl internal. #include "absl/base/internal/cycleclock.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/logging.h b/third_party/xla/xla/tsl/platform/default/logging.h similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/default/logging.h rename to third_party/xla/xla/tsl/platform/default/logging.h index d7842735413..c118157347a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/logging.h +++ b/third_party/xla/xla/tsl/platform/default/logging.h @@ -19,10 +19,10 @@ limitations under the License. #pragma warning(disable : 4716) #endif // _WIN32 -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_LOGGING_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_LOGGING_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_LOGGING_H_ +#define XLA_TSL_PLATFORM_DEFAULT_LOGGING_H_ -// IWYU pragma: private, include "tsl/platform/logging.h" +// IWYU pragma: private, include "third_party/tensorflow/tsl/platform/logging.h" // IWYU pragma: friend third_party/tensorflow/tsl/platform/logging.h #include @@ -637,4 +637,4 @@ void UpdateLogVerbosityIfDefined(const char* env_var); } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_LOGGING_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_LOGGING_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/mutex.cc b/third_party/xla/xla/tsl/platform/default/mutex.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/mutex.cc rename to third_party/xla/xla/tsl/platform/default/mutex.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/mutex.h b/third_party/xla/xla/tsl/platform/default/mutex.h similarity index 85% rename from third_party/xla/third_party/tsl/tsl/platform/default/mutex.h rename to third_party/xla/xla/tsl/platform/default/mutex.h index 6cf290c7c13..51e172a457d 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/mutex.h +++ b/third_party/xla/xla/tsl/platform/default/mutex.h @@ -13,10 +13,10 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_MUTEX_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_MUTEX_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_MUTEX_H_ +#define XLA_TSL_PLATFORM_DEFAULT_MUTEX_H_ -// IWYU pragma: private, include "tsl/platform/mutex.h" +// IWYU pragma: private, include "third_party/tensorflow/tsl/platform/mutex.h" // IWYU pragma: friend third_party/tensorflow/tsl/platform/mutex.h namespace tsl { @@ -36,4 +36,4 @@ std::cv_status condition_variable::wait_for( } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_MUTEX_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_MUTEX_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/mutex_data.h b/third_party/xla/xla/tsl/platform/default/mutex_data.h similarity index 84% rename from third_party/xla/third_party/tsl/tsl/platform/default/mutex_data.h rename to third_party/xla/xla/tsl/platform/default/mutex_data.h index 5c73d559fb8..411e811313a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/mutex_data.h +++ b/third_party/xla/xla/tsl/platform/default/mutex_data.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_MUTEX_DATA_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_MUTEX_DATA_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_MUTEX_DATA_H_ +#define XLA_TSL_PLATFORM_DEFAULT_MUTEX_DATA_H_ namespace tsl { namespace internal { @@ -32,4 +32,4 @@ struct CVData { } // namespace internal } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_MUTEX_DATA_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_MUTEX_DATA_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/net.cc b/third_party/xla/xla/tsl/platform/default/net.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/net.cc rename to third_party/xla/xla/tsl/platform/default/net.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/platform.bzl b/third_party/xla/xla/tsl/platform/default/platform.bzl similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/platform.bzl rename to third_party/xla/xla/tsl/platform/default/platform.bzl diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/port.cc b/third_party/xla/xla/tsl/platform/default/port.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/default/port.cc rename to third_party/xla/xla/tsl/platform/default/port.cc index e5dbff497ad..53b566fbc12 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/port.cc +++ b/third_party/xla/xla/tsl/platform/default/port.cc @@ -47,7 +47,7 @@ limitations under the License. #endif #if TENSORFLOW_USE_NUMA -#include "hwloc.h" // from @hwloc +#include "hwloc.h/" #endif #if defined(__ANDROID__) && (defined(__i386__) || defined(__x86_64__)) diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/posix_file_system.cc b/third_party/xla/xla/tsl/platform/default/posix_file_system.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/default/posix_file_system.cc rename to third_party/xla/xla/tsl/platform/default/posix_file_system.cc index 834bbef63ab..66f2d758d83 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/posix_file_system.cc +++ b/third_party/xla/xla/tsl/platform/default/posix_file_system.cc @@ -29,8 +29,8 @@ limitations under the License. #include #include +#include "xla/tsl/platform/default/posix_file_system.h" #include "xla/tsl/protobuf/error_codes.pb.h" -#include "tsl/platform/default/posix_file_system.h" #include "tsl/platform/env.h" #include "tsl/platform/errors.h" #include "tsl/platform/file_system_helper.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/posix_file_system.h b/third_party/xla/xla/tsl/platform/default/posix_file_system.h similarity index 94% rename from third_party/xla/third_party/tsl/tsl/platform/default/posix_file_system.h rename to third_party/xla/xla/tsl/platform/default/posix_file_system.h index f22d4c99571..e241305d6a1 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/posix_file_system.h +++ b/third_party/xla/xla/tsl/platform/default/posix_file_system.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_POSIX_FILE_SYSTEM_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_POSIX_FILE_SYSTEM_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_POSIX_FILE_SYSTEM_H_ +#define XLA_TSL_PLATFORM_DEFAULT_POSIX_FILE_SYSTEM_H_ #include "tsl/platform/env.h" #include "tsl/platform/path.h" @@ -84,4 +84,4 @@ class LocalPosixFileSystem : public PosixFileSystem { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_POSIX_FILE_SYSTEM_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_POSIX_FILE_SYSTEM_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/resource.cc b/third_party/xla/xla/tsl/platform/default/resource.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/resource.cc rename to third_party/xla/xla/tsl/platform/default/resource.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/rocm_rocdl_path.cc b/third_party/xla/xla/tsl/platform/default/rocm_rocdl_path.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/rocm_rocdl_path.cc rename to third_party/xla/xla/tsl/platform/default/rocm_rocdl_path.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/rules_cc.bzl b/third_party/xla/xla/tsl/platform/default/rules_cc.bzl similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/rules_cc.bzl rename to third_party/xla/xla/tsl/platform/default/rules_cc.bzl diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/stacktrace.h b/third_party/xla/xla/tsl/platform/default/stacktrace.h similarity index 93% rename from third_party/xla/third_party/tsl/tsl/platform/default/stacktrace.h rename to third_party/xla/xla/tsl/platform/default/stacktrace.h index be05fdb88fe..61f54546eb6 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/stacktrace.h +++ b/third_party/xla/xla/tsl/platform/default/stacktrace.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_STACKTRACE_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_STACKTRACE_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_STACKTRACE_H_ +#define XLA_TSL_PLATFORM_DEFAULT_STACKTRACE_H_ // clang-format off #include "tsl/platform/platform.h" @@ -99,4 +99,4 @@ class SavedStackTrace { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_STACKTRACE_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_STACKTRACE_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/stacktrace_handler.cc b/third_party/xla/xla/tsl/platform/default/stacktrace_handler.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/stacktrace_handler.cc rename to third_party/xla/xla/tsl/platform/default/stacktrace_handler.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/status.h b/third_party/xla/xla/tsl/platform/default/status.h similarity index 83% rename from third_party/xla/third_party/tsl/tsl/platform/default/status.h rename to third_party/xla/xla/tsl/platform/default/status.h index 1de5de28ba1..3f6c7f17a9a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/status.h +++ b/third_party/xla/xla/tsl/platform/default/status.h @@ -12,12 +12,12 @@ 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. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_STATUS_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_STATUS_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_STATUS_H_ +#define XLA_TSL_PLATFORM_DEFAULT_STATUS_H_ #define MAYBE_ADD_SOURCE_LOCATION(status) \ {} #define ADD_SOURCE_LOCATION(status) status -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_STATUS_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_STATUS_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/statusor.h b/third_party/xla/xla/tsl/platform/default/statusor.h similarity index 88% rename from third_party/xla/third_party/tsl/tsl/platform/default/statusor.h rename to third_party/xla/xla/tsl/platform/default/statusor.h index 6af26492d16..d5ddb2d0668 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/statusor.h +++ b/third_party/xla/xla/tsl/platform/default/statusor.h @@ -12,8 +12,8 @@ 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. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_STATUSOR_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_STATUSOR_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_STATUSOR_H_ +#define XLA_TSL_PLATFORM_DEFAULT_STATUSOR_H_ #include "absl/status/statusor.h" #include "tsl/platform/macros.h" @@ -30,4 +30,4 @@ limitations under the License. } \ lhs = std::move(statusor).value() -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_STATUSOR_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_STATUSOR_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/subprocess.cc b/third_party/xla/xla/tsl/platform/default/subprocess.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/subprocess.cc rename to third_party/xla/xla/tsl/platform/default/subprocess.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/subprocess.h b/third_party/xla/xla/tsl/platform/default/subprocess.h similarity index 96% rename from third_party/xla/third_party/tsl/tsl/platform/default/subprocess.h rename to third_party/xla/xla/tsl/platform/default/subprocess.h index 5b6e1f31065..7366762bb1e 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/subprocess.h +++ b/third_party/xla/xla/tsl/platform/default/subprocess.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_SUBPROCESS_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_SUBPROCESS_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_SUBPROCESS_H_ +#define XLA_TSL_PLATFORM_DEFAULT_SUBPROCESS_H_ #include #include @@ -129,4 +129,4 @@ class SubProcess { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_SUBPROCESS_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_SUBPROCESS_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/tracing.cc b/third_party/xla/xla/tsl/platform/default/tracing.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/default/tracing.cc rename to third_party/xla/xla/tsl/platform/default/tracing.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/tracing_impl.h b/third_party/xla/xla/tsl/platform/default/tracing_impl.h similarity index 88% rename from third_party/xla/third_party/tsl/tsl/platform/default/tracing_impl.h rename to third_party/xla/xla/tsl/platform/default/tracing_impl.h index cf30428f578..63841a08e64 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/tracing_impl.h +++ b/third_party/xla/xla/tsl/platform/default/tracing_impl.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_TRACING_IMPL_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_TRACING_IMPL_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_TRACING_IMPL_H_ +#define XLA_TSL_PLATFORM_DEFAULT_TRACING_IMPL_H_ #ifndef IS_MOBILE_PLATFORM #include "xla/tsl/profiler/backends/cpu/threadpool_listener_state.h" @@ -47,4 +47,4 @@ inline bool EventCollector::IsEnabled() { } // namespace tracing } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_TRACING_IMPL_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_TRACING_IMPL_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/unbounded_work_queue.cc b/third_party/xla/xla/tsl/platform/default/unbounded_work_queue.cc similarity index 98% rename from third_party/xla/third_party/tsl/tsl/platform/default/unbounded_work_queue.cc rename to third_party/xla/xla/tsl/platform/default/unbounded_work_queue.cc index a1a7dcdd920..818d5443543 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/unbounded_work_queue.cc +++ b/third_party/xla/xla/tsl/platform/default/unbounded_work_queue.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/default/unbounded_work_queue.h" +#include "xla/tsl/platform/default/unbounded_work_queue.h" #include "absl/memory/memory.h" #include "tsl/platform/env.h" diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/unbounded_work_queue.h b/third_party/xla/xla/tsl/platform/default/unbounded_work_queue.h similarity index 92% rename from third_party/xla/third_party/tsl/tsl/platform/default/unbounded_work_queue.h rename to third_party/xla/xla/tsl/platform/default/unbounded_work_queue.h index 2f3563785d6..401b2b596d3 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/unbounded_work_queue.h +++ b/third_party/xla/xla/tsl/platform/default/unbounded_work_queue.h @@ -12,8 +12,8 @@ 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. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_UNBOUNDED_WORK_QUEUE_H_ -#define TENSORFLOW_TSL_PLATFORM_DEFAULT_UNBOUNDED_WORK_QUEUE_H_ +#ifndef XLA_TSL_PLATFORM_DEFAULT_UNBOUNDED_WORK_QUEUE_H_ +#define XLA_TSL_PLATFORM_DEFAULT_UNBOUNDED_WORK_QUEUE_H_ #include #include @@ -65,4 +65,4 @@ class UnboundedWorkQueue { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_DEFAULT_UNBOUNDED_WORK_QUEUE_H_ +#endif // XLA_TSL_PLATFORM_DEFAULT_UNBOUNDED_WORK_QUEUE_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/BUILD b/third_party/xla/xla/tsl/platform/windows/BUILD similarity index 51% rename from third_party/xla/third_party/tsl/tsl/platform/windows/BUILD rename to third_party/xla/xla/tsl/platform/windows/BUILD index 48737e5c6c5..0c3292f35e0 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/BUILD +++ b/third_party/xla/xla/tsl/platform/windows/BUILD @@ -5,17 +5,17 @@ load( # Tensorflow windows-specific implementations of tensorflow/core/platform libraries. load( - "@local_xla//xla/tsl:tsl.bzl", + "//xla/tsl:tsl.bzl", "internal_visibility", "tsl_copts", ) -load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], default_visibility = internal_visibility([ "//tensorflow/core/platform:__pkg__", - "//tsl/platform:__pkg__", + "@local_tsl//tsl/platform:__pkg__", ]), licenses = ["notice"], ) @@ -25,17 +25,17 @@ cc_library( srcs = [ "windows_file_system.cc", "windows_file_system.h", - "//tsl/platform:env.cc", - "//tsl/platform:file_system.cc", - "//tsl/platform:file_system_helper.cc", - "//tsl/platform:ram_file_system.h", - "//tsl/platform:threadpool.cc", + "@local_tsl//tsl/platform:env.cc", + "@local_tsl//tsl/platform:file_system.cc", + "@local_tsl//tsl/platform:file_system_helper.cc", + "@local_tsl//tsl/platform:ram_file_system.h", + "@local_tsl//tsl/platform:threadpool.cc", ], hdrs = [ - "//tsl/platform:env.h", - "//tsl/platform:file_system.h", - "//tsl/platform:file_system_helper.h", - "//tsl/platform:threadpool.h", + "@local_tsl//tsl/platform:env.h", + "@local_tsl//tsl/platform:file_system.h", + "@local_tsl//tsl/platform:file_system_helper.h", + "@local_tsl//tsl/platform:threadpool.h", ], tags = [ "manual", @@ -45,37 +45,37 @@ cc_library( deps = [ ":error_windows", ":wide_char", - "//tsl/platform", - "//tsl/platform:blocking_counter", - "//tsl/platform:context", - "//tsl/platform:cord", - "//tsl/platform:denormal", - "//tsl/platform:env_time", - "//tsl/platform:errors", - "//tsl/platform:file_statistics", - "//tsl/platform:load_library", - "//tsl/platform:logging", - "//tsl/platform:macros", - "//tsl/platform:mutex", - "//tsl/platform:path", - "//tsl/platform:platform_port", - "//tsl/platform:protobuf", - "//tsl/platform:regexp", - "//tsl/platform:setround", - "//tsl/platform:status", - "//tsl/platform:statusor", - "//tsl/platform:str_util", - "//tsl/platform:strcat", - "//tsl/platform:stringpiece", - "//tsl/platform:stringprintf", - "//tsl/platform:threadpool_interface", - "//tsl/platform:tracing", - "//tsl/platform:types", + "//xla/tsl/protobuf:error_codes_proto_impl_cc", "@com_google_absl//absl/functional:any_invocable", "@com_google_absl//absl/time", "@com_google_absl//absl/types:optional", "@eigen_archive//:eigen3", - "@local_xla//xla/tsl/protobuf:error_codes_proto_impl_cc", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:blocking_counter", + "@local_tsl//tsl/platform:context", + "@local_tsl//tsl/platform:cord", + "@local_tsl//tsl/platform:denormal", + "@local_tsl//tsl/platform:env_time", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:file_statistics", + "@local_tsl//tsl/platform:load_library", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:path", + "@local_tsl//tsl/platform:platform_port", + "@local_tsl//tsl/platform:protobuf", + "@local_tsl//tsl/platform:regexp", + "@local_tsl//tsl/platform:setround", + "@local_tsl//tsl/platform:status", + "@local_tsl//tsl/platform:statusor", + "@local_tsl//tsl/platform:str_util", + "@local_tsl//tsl/platform:strcat", + "@local_tsl//tsl/platform:stringpiece", + "@local_tsl//tsl/platform:stringprintf", + "@local_tsl//tsl/platform:threadpool_interface", + "@local_tsl//tsl/platform:tracing", + "@local_tsl//tsl/platform:types", ], ) @@ -97,14 +97,14 @@ cc_library( cc_library( name = "env_time", srcs = ["env_time.cc"], - hdrs = ["//tsl/platform:env_time.h"], + hdrs = ["@local_tsl//tsl/platform:env_time.h"], tags = [ "manual", "no_oss", "nobuilder", ], deps = [ - "//tsl/platform:types", + "@local_tsl//tsl/platform:types", ], ) @@ -131,13 +131,13 @@ cc_library( "no_oss", "nobuilder", ], - deps = ["//tsl/platform:types"], + deps = ["@local_tsl//tsl/platform:types"], ) cc_library( name = "load_library", srcs = ["load_library.cc"], - hdrs = ["//tsl/platform:load_library.h"], + hdrs = ["@local_tsl//tsl/platform:load_library.h"], tags = [ "manual", "no_oss", @@ -145,8 +145,8 @@ cc_library( ], deps = [ ":wide_char", - "//tsl/platform:errors", "@com_google_absl//absl/status", + "@local_tsl//tsl/platform:errors", ], ) @@ -154,7 +154,7 @@ cc_library( name = "net", srcs = ["net.cc"], hdrs = [ - "//tsl/platform:net.h", + "@local_tsl//tsl/platform:net.h", ], linkopts = ["-DEFAULTLIB:ws2_32.lib"], tags = [ @@ -164,8 +164,8 @@ cc_library( ], deps = [ ":error_windows", - "//tsl/platform:errors", - "//tsl/platform:logging", + "@local_tsl//tsl/platform:errors", + "@local_tsl//tsl/platform:logging", ], ) @@ -173,16 +173,16 @@ cc_library( name = "platform_port", srcs = [ "port.cc", - "//tsl/platform:cpu_info.cc", + "@local_tsl//tsl/platform:cpu_info.cc", ], hdrs = [ - "//tsl/platform:cpu_info.h", - "//tsl/platform:demangle.h", - "//tsl/platform:host_info.h", - "//tsl/platform:init_main.h", - "//tsl/platform:mem.h", - "//tsl/platform:numa.h", - "//tsl/platform:snappy.h", + "@local_tsl//tsl/platform:cpu_info.h", + "@local_tsl//tsl/platform:demangle.h", + "@local_tsl//tsl/platform:host_info.h", + "@local_tsl//tsl/platform:init_main.h", + "@local_tsl//tsl/platform:mem.h", + "@local_tsl//tsl/platform:numa.h", + "@local_tsl//tsl/platform:snappy.h", ], copts = tsl_copts(), defines = ["TF_USE_SNAPPY"], @@ -192,11 +192,11 @@ cc_library( "nobuilder", ], deps = [ - "//tsl/platform", - "//tsl/platform:byte_order", - "//tsl/platform:dynamic_annotations", - "//tsl/platform:logging", - "//tsl/platform:types", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:byte_order", + "@local_tsl//tsl/platform:dynamic_annotations", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:types", "@snappy", ], ) @@ -210,29 +210,29 @@ cc_library( "no_oss", "nobuilder", ], - deps = ["//tsl/platform:mutex"], + deps = ["@local_tsl//tsl/platform:mutex"], ) cc_library( name = "stacktrace_handler", srcs = ["stacktrace_handler.cc"], - hdrs = ["//tsl/platform:stacktrace_handler.h"], + hdrs = ["@local_tsl//tsl/platform:stacktrace_handler.h"], tags = [ "manual", "no_oss", "nobuilder", ], deps = [ - "//tsl/platform:mutex", - "//tsl/platform:stacktrace", - "//tsl/platform:types", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:stacktrace", + "@local_tsl//tsl/platform:types", ], ) cc_library( name = "subprocess", srcs = ["subprocess.cc"], - hdrs = ["//tsl/platform:subprocess.h"], + hdrs = ["@local_tsl//tsl/platform:subprocess.h"], tags = [ "manual", "no_oss", @@ -240,12 +240,12 @@ cc_library( ], textual_hdrs = ["subprocess.h"], deps = [ - "//tsl/platform", - "//tsl/platform:logging", - "//tsl/platform:macros", - "//tsl/platform:mutex", - "//tsl/platform:strcat", - "//tsl/platform:types", + "@local_tsl//tsl/platform", + "@local_tsl//tsl/platform:logging", + "@local_tsl//tsl/platform:macros", + "@local_tsl//tsl/platform:mutex", + "@local_tsl//tsl/platform:strcat", + "@local_tsl//tsl/platform:types", ], ) diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/env.cc b/third_party/xla/xla/tsl/platform/windows/env.cc similarity index 98% rename from third_party/xla/third_party/tsl/tsl/platform/windows/env.cc rename to third_party/xla/xla/tsl/platform/windows/env.cc index 58fb1d83afd..58382bafd24 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/env.cc +++ b/third_party/xla/xla/tsl/platform/windows/env.cc @@ -28,12 +28,12 @@ limitations under the License. #include #include +#include "xla/tsl/platform/windows/wide_char.h" +#include "xla/tsl/platform/windows/windows_file_system.h" #include "xla/tsl/protobuf/error_codes.pb.h" #include "tsl/platform/load_library.h" #include "tsl/platform/logging.h" #include "tsl/platform/ram_file_system.h" -#include "tsl/platform/windows/wide_char.h" -#include "tsl/platform/windows/windows_file_system.h" #pragma comment(lib, "shlwapi.lib") diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/env_time.cc b/third_party/xla/xla/tsl/platform/windows/env_time.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/windows/env_time.cc rename to third_party/xla/xla/tsl/platform/windows/env_time.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/error_windows.cc b/third_party/xla/xla/tsl/platform/windows/error_windows.cc similarity index 96% rename from third_party/xla/third_party/tsl/tsl/platform/windows/error_windows.cc rename to third_party/xla/xla/tsl/platform/windows/error_windows.cc index c9ad225e0dc..763598e7b28 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/error_windows.cc +++ b/third_party/xla/xla/tsl/platform/windows/error_windows.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/windows/error_windows.h" +#include "xla/tsl/platform/windows/error_windows.h" #include #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/error_windows.h b/third_party/xla/xla/tsl/platform/windows/error_windows.h similarity index 88% rename from third_party/xla/third_party/tsl/tsl/platform/windows/error_windows.h rename to third_party/xla/xla/tsl/platform/windows/error_windows.h index e6a5d456e7c..2af1bf506e2 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/error_windows.h +++ b/third_party/xla/xla/tsl/platform/windows/error_windows.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_WINDOWS_ERROR_WINDOWS_H_ -#define TENSORFLOW_TSL_PLATFORM_WINDOWS_ERROR_WINDOWS_H_ +#ifndef XLA_TSL_PLATFORM_WINDOWS_ERROR_WINDOWS_H_ +#define XLA_TSL_PLATFORM_WINDOWS_ERROR_WINDOWS_H_ // This file is here to provide a windows specific interface to error functions // without needing to include any windows specific headers. This is intended to @@ -37,4 +37,4 @@ std::string WindowsWSAGetLastErrorMessage(); } // namespace internal } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_WINDOWS_ERROR_WINDOWS_H_ +#endif // XLA_TSL_PLATFORM_WINDOWS_ERROR_WINDOWS_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/intrinsics_port.h b/third_party/xla/xla/tsl/platform/windows/intrinsics_port.h similarity index 88% rename from third_party/xla/third_party/tsl/tsl/platform/windows/intrinsics_port.h rename to third_party/xla/xla/tsl/platform/windows/intrinsics_port.h index 8c6b8f9314a..e8a64a4684a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/intrinsics_port.h +++ b/third_party/xla/xla/tsl/platform/windows/intrinsics_port.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_WINDOWS_INTRINSICS_PORT_H_ -#define TENSORFLOW_TSL_PLATFORM_WINDOWS_INTRINSICS_PORT_H_ +#ifndef XLA_TSL_PLATFORM_WINDOWS_INTRINSICS_PORT_H_ +#define XLA_TSL_PLATFORM_WINDOWS_INTRINSICS_PORT_H_ #ifdef _MSC_VER // the following avx intrinsics are not defined on windows @@ -38,4 +38,4 @@ static inline __m256i _mm256_insert_epi32(__m256i a, int b, const int i) { } #endif #endif -#endif +#endif // XLA_TSL_PLATFORM_WINDOWS_INTRINSICS_PORT_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/load_library.cc b/third_party/xla/xla/tsl/platform/windows/load_library.cc similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/windows/load_library.cc rename to third_party/xla/xla/tsl/platform/windows/load_library.cc index 66d2d62cf6e..2a1305db656 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/load_library.cc +++ b/third_party/xla/xla/tsl/platform/windows/load_library.cc @@ -29,7 +29,7 @@ limitations under the License. #include #include "absl/status/status.h" -#include "tsl/platform/windows/wide_char.h" +#include "xla/tsl/platform/windows/wide_char.h" #pragma comment(lib, "Shlwapi.lib") diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/net.cc b/third_party/xla/xla/tsl/platform/windows/net.cc similarity index 98% rename from third_party/xla/third_party/tsl/tsl/platform/windows/net.cc rename to third_party/xla/xla/tsl/platform/windows/net.cc index 0a2247a1e4d..1823ef8f679 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/net.cc +++ b/third_party/xla/xla/tsl/platform/windows/net.cc @@ -21,9 +21,9 @@ limitations under the License. #include #include +#include "xla/tsl/platform/windows/error_windows.h" #include "tsl/platform/errors.h" #include "tsl/platform/logging.h" -#include "tsl/platform/windows/error_windows.h" #undef ERROR diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/port.cc b/third_party/xla/xla/tsl/platform/windows/port.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/windows/port.cc rename to third_party/xla/xla/tsl/platform/windows/port.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/stacktrace.cc b/third_party/xla/xla/tsl/platform/windows/stacktrace.cc similarity index 98% rename from third_party/xla/third_party/tsl/tsl/platform/windows/stacktrace.cc rename to third_party/xla/xla/tsl/platform/windows/stacktrace.cc index 91448801a0d..768bcfdc124 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/stacktrace.cc +++ b/third_party/xla/xla/tsl/platform/windows/stacktrace.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/windows/stacktrace.h" +#include "xla/tsl/platform/windows/stacktrace.h" // clang-format off #include // Windows.h must be declared above dgbhelp. diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/stacktrace.h b/third_party/xla/xla/tsl/platform/windows/stacktrace.h similarity index 89% rename from third_party/xla/third_party/tsl/tsl/platform/windows/stacktrace.h rename to third_party/xla/xla/tsl/platform/windows/stacktrace.h index 74277d1389b..492cbbf07f5 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/stacktrace.h +++ b/third_party/xla/xla/tsl/platform/windows/stacktrace.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_WINDOWS_STACKTRACE_H_ -#define TENSORFLOW_TSL_PLATFORM_WINDOWS_STACKTRACE_H_ +#ifndef XLA_TSL_PLATFORM_WINDOWS_STACKTRACE_H_ +#define XLA_TSL_PLATFORM_WINDOWS_STACKTRACE_H_ #include @@ -50,4 +50,4 @@ class SavedStackTrace { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_WINDOWS_STACKTRACE_H_ +#endif // XLA_TSL_PLATFORM_WINDOWS_STACKTRACE_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/stacktrace_handler.cc b/third_party/xla/xla/tsl/platform/windows/stacktrace_handler.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/windows/stacktrace_handler.cc rename to third_party/xla/xla/tsl/platform/windows/stacktrace_handler.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/subprocess.cc b/third_party/xla/xla/tsl/platform/windows/subprocess.cc similarity index 100% rename from third_party/xla/third_party/tsl/tsl/platform/windows/subprocess.cc rename to third_party/xla/xla/tsl/platform/windows/subprocess.cc diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/subprocess.h b/third_party/xla/xla/tsl/platform/windows/subprocess.h similarity index 96% rename from third_party/xla/third_party/tsl/tsl/platform/windows/subprocess.h rename to third_party/xla/xla/tsl/platform/windows/subprocess.h index 05148e465e9..8c590995378 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/subprocess.h +++ b/third_party/xla/xla/tsl/platform/windows/subprocess.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_WINDOWS_SUBPROCESS_H_ -#define TENSORFLOW_TSL_PLATFORM_WINDOWS_SUBPROCESS_H_ +#ifndef XLA_TSL_PLATFORM_WINDOWS_SUBPROCESS_H_ +#define XLA_TSL_PLATFORM_WINDOWS_SUBPROCESS_H_ #include #include @@ -123,4 +123,4 @@ class SubProcess { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_WINDOWS_SUBPROCESS_H_ +#endif // XLA_TSL_PLATFORM_WINDOWS_SUBPROCESS_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/wide_char.cc b/third_party/xla/xla/tsl/platform/windows/wide_char.cc similarity index 97% rename from third_party/xla/third_party/tsl/tsl/platform/windows/wide_char.cc rename to third_party/xla/xla/tsl/platform/windows/wide_char.cc index f88cb8eda41..903fa64f21e 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/wide_char.cc +++ b/third_party/xla/xla/tsl/platform/windows/wide_char.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/windows/wide_char.h" +#include "xla/tsl/platform/windows/wide_char.h" #include diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/wide_char.h b/third_party/xla/xla/tsl/platform/windows/wide_char.h similarity index 83% rename from third_party/xla/third_party/tsl/tsl/platform/windows/wide_char.h rename to third_party/xla/xla/tsl/platform/windows/wide_char.h index acf8a6e0d07..9e263c72026 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/wide_char.h +++ b/third_party/xla/xla/tsl/platform/windows/wide_char.h @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_WINDOWS_WIDE_CHAR_H_ -#define TENSORFLOW_TSL_PLATFORM_WINDOWS_WIDE_CHAR_H_ +#ifndef XLA_TSL_PLATFORM_WINDOWS_WIDE_CHAR_H_ +#define XLA_TSL_PLATFORM_WINDOWS_WIDE_CHAR_H_ #include @@ -26,4 +26,4 @@ std::string WideCharToUtf8(const std::wstring& wstr); } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_WINDOWS_WIDE_CHAR_H_ +#endif // XLA_TSL_PLATFORM_WINDOWS_WIDE_CHAR_H_ diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/windows_file_system.cc b/third_party/xla/xla/tsl/platform/windows/windows_file_system.cc similarity index 99% rename from third_party/xla/third_party/tsl/tsl/platform/windows/windows_file_system.cc rename to third_party/xla/xla/tsl/platform/windows/windows_file_system.cc index faa90a82530..c5de08a515c 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/windows_file_system.cc +++ b/third_party/xla/xla/tsl/platform/windows/windows_file_system.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tsl/platform/windows/windows_file_system.h" +#include "xla/tsl/platform/windows/windows_file_system.h" #include #include @@ -27,14 +27,14 @@ limitations under the License. #include #include +#include "xla/tsl/platform/windows/error_windows.h" +#include "xla/tsl/platform/windows/wide_char.h" #include "xla/tsl/protobuf/error_codes.pb.h" #include "tsl/platform/env.h" #include "tsl/platform/errors.h" #include "tsl/platform/file_system_helper.h" #include "tsl/platform/logging.h" #include "tsl/platform/strcat.h" -#include "tsl/platform/windows/error_windows.h" -#include "tsl/platform/windows/wide_char.h" // TODO(mrry): Prevent this Windows.h #define from leaking out of our headers. #undef DeleteFile diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/windows_file_system.h b/third_party/xla/xla/tsl/platform/windows/windows_file_system.h similarity index 94% rename from third_party/xla/third_party/tsl/tsl/platform/windows/windows_file_system.h rename to third_party/xla/xla/tsl/platform/windows/windows_file_system.h index 49ab0b25883..c29294d33fa 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/windows_file_system.h +++ b/third_party/xla/xla/tsl/platform/windows/windows_file_system.h @@ -13,14 +13,15 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#ifndef TENSORFLOW_TSL_PLATFORM_WINDOWS_WINDOWS_FILE_SYSTEM_H_ -#define TENSORFLOW_TSL_PLATFORM_WINDOWS_WINDOWS_FILE_SYSTEM_H_ +#ifndef XLA_TSL_PLATFORM_WINDOWS_WINDOWS_FILE_SYSTEM_H_ +#define XLA_TSL_PLATFORM_WINDOWS_WINDOWS_FILE_SYSTEM_H_ #include "tsl/platform/file_system.h" #include "tsl/platform/path.h" #include "tsl/platform/platform.h" #ifdef PLATFORM_WINDOWS +#undef CopyFile #undef DeleteFile #endif @@ -95,4 +96,4 @@ class LocalWinFileSystem : public WindowsFileSystem { } // namespace tsl -#endif // TENSORFLOW_TSL_PLATFORM_WINDOWS_WINDOWS_FILE_SYSTEM_H_ +#endif // XLA_TSL_PLATFORM_WINDOWS_WINDOWS_FILE_SYSTEM_H_ diff --git a/third_party/xla/xla/tsl/profiler/backends/cpu/BUILD b/third_party/xla/xla/tsl/profiler/backends/cpu/BUILD index fdad307f9ac..29957a42f43 100644 --- a/third_party/xla/xla/tsl/profiler/backends/cpu/BUILD +++ b/third_party/xla/xla/tsl/profiler/backends/cpu/BUILD @@ -35,7 +35,8 @@ cc_library( copts = tf_profiler_copts(), visibility = internal_visibility([ "//tensorflow/python:__pkg__", - "@local_tsl//tsl/platform/cloud:__pkg__", + "//xla/tsl/platform/cloud:__pkg__", + "//xla/tsl/platform/cloud:__pkg__", "//xla/tsl/profiler:__pkg__", "//xla/tsl/profiler:internal", "//xla/tsl/profiler:xla_internal", @@ -136,7 +137,8 @@ cc_library( hdrs = ["threadpool_listener.h"], visibility = internal_visibility([ "//tensorflow/python:__pkg__", - "@local_tsl//tsl/platform/cloud:__pkg__", + "//xla/tsl/platform/cloud:__pkg__", + "//xla/tsl/platform/cloud:__pkg__", "//xla/tsl/profiler:__pkg__", "//xla/tsl/profiler:internal", "//xla/tsl/profiler:xla_internal", @@ -164,5 +166,6 @@ cc_library( hdrs = ["threadpool_listener_state.h"], visibility = internal_visibility([ "@local_tsl//tsl/platform:__subpackages__", + "//xla/tsl/platform:__subpackages__", ]), ) diff --git a/third_party/xla/xla/tsl/profiler/utils/BUILD b/third_party/xla/xla/tsl/profiler/utils/BUILD index 281fca18206..3025bd10568 100644 --- a/third_party/xla/xla/tsl/profiler/utils/BUILD +++ b/third_party/xla/xla/tsl/profiler/utils/BUILD @@ -54,7 +54,7 @@ cc_library( copts = tf_profiler_copts(), visibility = internal_visibility([ "//xla:__subpackages__", - "@local_tsl//tsl/platform/cloud:__pkg__", + "//xla/tsl/platform/cloud:__pkg__", "//xla/tsl/profiler:internal", ]), deps = [ diff --git a/third_party/xla/xla/xla.bzl b/third_party/xla/xla/xla.bzl index e339dfeb4ad..00d191aed58 100644 --- a/third_party/xla/xla/xla.bzl +++ b/third_party/xla/xla/xla.bzl @@ -10,14 +10,14 @@ load( "if_static", "tf_exec_properties", ) -load( - "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", - "if_cuda_is_configured", -) load( "//xla/tsl:tsl.bzl", "tsl_copts", ) +load( + "//xla/tsl/platform/default:cuda_build_defs.bzl", + "if_cuda_is_configured", +) def xla_py_proto_library(**_kwargs): # Note: we don't currently define a proto library target for Python in OSS. @@ -92,7 +92,7 @@ def xla_bzl_library(name = "xla_bzl_library"): "//xla/tsl:tsl_bzl", "@local_config_rocm//rocm:build_defs_bzl", "@local_tsl//tsl/platform:build_config_root_bzl", - "@local_tsl//tsl/platform/default:cuda_build_defs_bzl", + "//xla/tsl/platform/default:cuda_build_defs_bzl", "@bazel_skylib//:bzl_library", ], )