Skip to content

Commit

Permalink
Move tsl/lib/monitoring to xla/tsl/lib/monitoring
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 668151691
  • Loading branch information
ddunl authored and copybara-github committed Sep 6, 2024
1 parent b0368b0 commit 0a36157
Show file tree
Hide file tree
Showing 36 changed files with 165 additions and 165 deletions.
2 changes: 1 addition & 1 deletion xla/hlo/experimental/auto_sharding/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ cc_library(
srcs = ["metrics.cc"],
hdrs = ["metrics.h"],
compatible_with = get_compatible_with_libtpu_portable(),
deps = ["@tsl//tsl/lib/monitoring:counter"],
deps = ["//xla/tsl/lib/monitoring:counter"],
)

xla_cc_binary(
Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/experimental/auto_sharding/metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
#include <cstdint>
#include <string>

#include "tsl/lib/monitoring/counter.h"
#include "xla/tsl/lib/monitoring/counter.h"

namespace xla {
namespace metrics {
Expand Down
6 changes: 3 additions & 3 deletions xla/pjrt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ xla_cc_test(
":pjrt_compiler",
":pjrt_device_description",
"//xla/client:xla_computation",
"//xla/tsl/lib/monitoring:cell_reader",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@tsl//tsl/lib/monitoring:cell_reader",
"@tsl//tsl/platform:status_matchers",
],
)
Expand Down Expand Up @@ -434,10 +434,10 @@ cc_library(
srcs = ["metrics.cc"],
hdrs = ["metrics.h"],
deps = [
"//xla/tsl/lib/monitoring:counter",
"//xla/tsl/lib/monitoring:gauge",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/strings",
"@tsl//tsl/lib/monitoring:counter",
"@tsl//tsl/lib/monitoring:gauge",
],
)

Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/gpu/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ cc_library(
srcs = ["gpu_metrics.cc"],
hdrs = ["gpu_metrics.h"],
deps = [
"//xla/tsl/lib/monitoring:gauge",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@tsl//tsl/lib/monitoring:gauge",
],
)

Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/gpu/gpu_metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
#include <cstdint>

#include "absl/strings/str_cat.h"
#include "tsl/lib/monitoring/gauge.h"
#include "xla/tsl/lib/monitoring/gauge.h"

namespace xla {
namespace {
Expand Down
4 changes: 2 additions & 2 deletions xla/pjrt/metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.

#include <cstdint>

#include "tsl/lib/monitoring/counter.h"
#include "tsl/lib/monitoring/gauge.h"
#include "xla/tsl/lib/monitoring/counter.h"
#include "xla/tsl/lib/monitoring/gauge.h"

namespace xla {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.

#include "absl/base/attributes.h"
#include "absl/strings/string_view.h"
#include "tsl/lib/monitoring/counter.h"
#include "xla/tsl/lib/monitoring/counter.h"

// Simplified version of tensorflow/core/framework/metrics.h for JAX.

Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/pjrt_compiler_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ limitations under the License.
#include "xla/pjrt/metrics.h"
#include "xla/pjrt/pjrt_client.h"
#include "xla/pjrt/pjrt_device_description.h"
#include "tsl/lib/monitoring/cell_reader.h"
#include "xla/tsl/lib/monitoring/cell_reader.h"
#include "tsl/platform/status_matchers.h"

namespace xla {
Expand Down
2 changes: 1 addition & 1 deletion xla/service/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4183,6 +4183,7 @@ cc_library(
"//xla:xla_data_proto_cc",
"//xla/client:xla_builder",
"//xla/hlo/ir:hlo",
"//xla/tsl/lib/monitoring:gauge",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/functional:function_ref",
Expand All @@ -4193,7 +4194,6 @@ cc_library(
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/types:span",
"@tsl//tsl/lib/monitoring:gauge",
"@tsl//tsl/platform:errors",
"@tsl//tsl/platform:statusor",
],
Expand Down
2 changes: 1 addition & 1 deletion xla/service/dynamic_padder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ limitations under the License.
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/tsl/lib/monitoring/gauge.h"
#include "xla/util.h"
#include "xla/window_util.h"
#include "xla/xla_data.pb.h"
#include "tsl/lib/monitoring/gauge.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/statusor.h"

Expand Down
8 changes: 4 additions & 4 deletions xla/service/gpu/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,7 @@ cc_library(
"//xla/stream_executor:platform_manager",
"//xla/translate/hlo_to_mhlo:hlo_utils",
"//xla/translate/mhlo_to_hlo:location_exporter",
"//xla/tsl/lib/monitoring:counter",
"//xla:autotune_results_proto_cc",
"//xla:debug_options_flags",
"//xla:shape_util",
Expand All @@ -1573,7 +1574,6 @@ cc_library(
"//xla:util",
"//xla:xla_data_proto_cc",
"//xla:xla_proto_cc",
"@tsl//tsl/lib/monitoring:counter",
"@tsl//tsl/platform:blocking_counter",
"@tsl//tsl/platform:casts",
"@tsl//tsl/platform:env",
Expand Down Expand Up @@ -2607,9 +2607,9 @@ cc_library(
srcs = ["metrics.cc"],
hdrs = ["metrics.h"],
deps = [
"@tsl//tsl/lib/monitoring:counter",
"@tsl//tsl/lib/monitoring:gauge",
"@tsl//tsl/lib/monitoring:sampler",
"//xla/tsl/lib/monitoring:counter",
"//xla/tsl/lib/monitoring:gauge",
"//xla/tsl/lib/monitoring:sampler",
],
)

Expand Down
6 changes: 3 additions & 3 deletions xla/service/gpu/metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ limitations under the License.

#include <cstdint>

#include "tsl/lib/monitoring/counter.h"
#include "tsl/lib/monitoring/gauge.h"
#include "tsl/lib/monitoring/sampler.h"
#include "xla/tsl/lib/monitoring/counter.h"
#include "xla/tsl/lib/monitoring/gauge.h"
#include "xla/tsl/lib/monitoring/sampler.h"

namespace xla {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion xla/tsl/distributed_runtime/coordination/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ tsl_gpu_library(
":coordination_service_error_util",
"//xla/tsl/distributed_runtime:call_options",
"//xla/tsl/framework:cancellation",
"//xla/tsl/lib/monitoring:gauge",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/functional:bind_front",
"@com_google_absl//absl/log",
Expand All @@ -154,7 +155,6 @@ tsl_gpu_library(
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@tsl//tsl/lib/monitoring:gauge",
"@tsl//tsl/platform:env",
"@tsl//tsl/platform:random",
"@tsl//tsl/platform:status",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ limitations under the License.
#include "xla/tsl/distributed_runtime/coordination/coordination_client.h"
#include "xla/tsl/distributed_runtime/coordination/coordination_service_error_util.h"
#include "xla/tsl/framework/cancellation.h"
#include "tsl/lib/monitoring/gauge.h"
#include "xla/tsl/lib/monitoring/gauge.h"
#include "tsl/platform/env.h"
#include "tsl/platform/random.h"
#include "tsl/platform/status.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tsl/distributed_runtime/preemption/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ cc_library(
":preemption_notifier",
"//xla/tsl/distributed_runtime:call_options",
"//xla/tsl/distributed_runtime/coordination:coordination_service_agent",
"//xla/tsl/lib/monitoring:gauge",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/log",
"@com_google_absl//absl/memory",
Expand All @@ -62,7 +63,6 @@ cc_library(
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@tsl//tsl/lib/monitoring:gauge",
"@tsl//tsl/platform:env",
"@tsl//tsl/platform:statusor",
"@tsl//tsl/protobuf:coordination_service_proto_cc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ limitations under the License.
#include "xla/tsl/distributed_runtime/call_options.h"
#include "xla/tsl/distributed_runtime/coordination/coordination_service_agent.h"
#include "xla/tsl/distributed_runtime/preemption/preemption_notifier.h"
#include "tsl/lib/monitoring/gauge.h"
#include "xla/tsl/lib/monitoring/gauge.h"
#include "tsl/platform/env.h"
#include "tsl/platform/statusor.h"
#include "tsl/protobuf/coordination_service.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tsl/framework/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ cc_library(
srcs = ["metrics.cc"],
hdrs = ["metrics.h"],
deps = [
"@tsl//tsl/lib/monitoring:counter",
"//xla/tsl/lib/monitoring:counter",
],
)

Expand Down
2 changes: 1 addition & 1 deletion xla/tsl/framework/metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

#include <cstdint>

#include "tsl/lib/monitoring/counter.h"
#include "xla/tsl/lib/monitoring/counter.h"

namespace tsl {
namespace metrics {
Expand Down
Loading

0 comments on commit 0a36157

Please sign in to comment.