Skip to content

Commit

Permalink
Move tsl/concurrency to xla/tsl/concurrency and update users
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 625096733
  • Loading branch information
ddunl authored and tensorflower-gardener committed Apr 15, 2024
1 parent f0e6f4a commit af3028d
Show file tree
Hide file tree
Showing 119 changed files with 219 additions and 216 deletions.
4 changes: 2 additions & 2 deletions tensorflow/core/tfrt/graph_executor/BUILD
Expand Up @@ -130,11 +130,11 @@ cc_library(
"@llvm-project//mlir:FuncDialect",
"@llvm-project//mlir:FuncExtensions",
"@llvm-project//mlir:IR",
"@local_tsl//tsl/concurrency:async_value",
"@local_tsl//tsl/concurrency:ref_count",
"@local_tsl//tsl/platform:refcount",
"@local_tsl//tsl/platform:status",
"@local_tsl//tsl/profiler/lib:traceme",
"@local_xla//xla/tsl/concurrency:async_value",
"@local_xla//xla/tsl/concurrency:ref_count",
"@tf_runtime//:basic_kernels_alwayslink",
"@tf_runtime//:bef",
"@tf_runtime//:befexecutor",
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/graph_executor/graph_executor.cc
Expand Up @@ -55,6 +55,7 @@ limitations under the License.
#include "tensorflow/compiler/mlir/tfrt/transforms/update_op_cost_in_tfrt_mlir.h"
#include "tensorflow/compiler/mlir/tfrt/translate/import_model.h"
#include "tensorflow/compiler/mlir/tfrt/translate/tfrt_compile_options.h"
#include "xla/tsl/concurrency/async_value_ref.h"
#include "tensorflow/core/common_runtime/process_function_library_runtime.h"
#include "tensorflow/core/common_runtime/rendezvous_mgr.h"
#include "tensorflow/core/framework/function.h"
Expand Down Expand Up @@ -95,7 +96,6 @@ limitations under the License.
#include "tensorflow/core/tfrt/utils/fallback_tensor.h"
#include "tensorflow/core/tfrt/utils/tfrt_graph_execution_state.h"
#include "tensorflow/core/tfrt/utils/utils.h"
#include "tsl/concurrency/async_value_ref.h"
#include "tsl/lib/monitoring/sampler.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/refcount.h"
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/graph_executor/graph_executor.h
Expand Up @@ -34,6 +34,7 @@ limitations under the License.
#include "mlir/IR/OwningOpRef.h" // from @llvm-project
#include "tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_flags.h"
#include "tensorflow/compiler/mlir/tfrt/backend_compiler.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "tensorflow/core/common_runtime/process_function_library_runtime.h"
#include "tensorflow/core/framework/cancellation.h"
#include "tensorflow/core/framework/function.h"
Expand All @@ -56,7 +57,6 @@ limitations under the License.
#include "tensorflow/core/tfrt/runtime/stream.h"
#include "tensorflow/core/tfrt/runtime/work_queue_interface.h"
#include "tensorflow/core/tfrt/utils/tfrt_graph_execution_state.h"
#include "tsl/concurrency/ref_count.h"
#include "tsl/lib/monitoring/sampler.h"
#include "tsl/platform/thread_annotations.h"
#include "tfrt/bef/bef_buffer.h" // from @tf_runtime
Expand Down
16 changes: 8 additions & 8 deletions tensorflow/core/tfrt/ifrt/BUILD
Expand Up @@ -79,7 +79,6 @@ cc_library(
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/types:span",
"@llvm-project//mlir:IR",
"@local_tsl//tsl/concurrency:ref_count",
"@local_tsl//tsl/platform:env",
"@local_tsl//tsl/platform:errors",
"@local_tsl//tsl/platform:statusor",
Expand All @@ -93,6 +92,7 @@ cc_library(
"@local_xla//xla/python/pjrt_ifrt",
"@local_xla//xla/python/pjrt_ifrt:xla_ifrt",
"@local_xla//xla/service:computation_placer_hdr",
"@local_xla//xla/tsl/concurrency:ref_count",
],
)

Expand Down Expand Up @@ -143,10 +143,10 @@ cc_library(
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@local_tsl//tsl/concurrency:ref_count",
"@local_tsl//tsl/platform:errors",
"@local_tsl//tsl/platform:statusor",
"@local_xla//xla/python/ifrt",
"@local_xla//xla/tsl/concurrency:ref_count",
],
)

Expand All @@ -165,9 +165,9 @@ cc_library(
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@local_tsl//tsl/concurrency:ref_count",
"@local_tsl//tsl/platform:env",
"@local_xla//xla/python/ifrt",
"@local_xla//xla/tsl/concurrency:ref_count",
"@tf_runtime//:hostcontext",
],
)
Expand Down Expand Up @@ -218,14 +218,14 @@ cc_library(
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@eigen_archive//:eigen3",
"@local_tsl//tsl/concurrency:ref_count",
"@local_tsl//tsl/platform:env",
"@local_tsl//tsl/platform:errors",
"@local_tsl//tsl/platform:statusor",
"@local_xla//xla:executable_run_options",
"@local_xla//xla/hlo/ir:hlo",
"@local_xla//xla/python/ifrt",
"@local_xla//xla/python/pjrt_ifrt:xla_ifrt",
"@local_xla//xla/tsl/concurrency:ref_count",
],
)

Expand All @@ -246,12 +246,12 @@ cc_library(
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@local_tsl//tsl/concurrency:ref_count",
"@local_tsl//tsl/platform:env",
"@local_tsl//tsl/platform:errors",
"@local_tsl//tsl/platform:statusor",
"@local_xla//xla/hlo/ir:hlo",
"@local_xla//xla/python/ifrt",
"@local_xla//xla/tsl/concurrency:ref_count",
"@tf_runtime//:hostcontext",
],
)
Expand Down Expand Up @@ -305,7 +305,6 @@ tf_cc_test(
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_googletest//:gtest_main",
"@local_tsl//tsl/concurrency:ref_count",
"@local_tsl//tsl/lib/core:status_test_util",
"@local_tsl//tsl/platform:env",
"@local_tsl//tsl/platform:status_matchers",
Expand All @@ -315,6 +314,7 @@ tf_cc_test(
"@local_xla//xla/python/ifrt",
"@local_xla//xla/python/ifrt:test_util",
"@local_xla//xla/python/pjrt_ifrt:tfrt_cpu_client_test_lib",
"@local_xla//xla/tsl/concurrency:ref_count",
"@tf_runtime//:hostcontext",
],
)
Expand Down Expand Up @@ -365,7 +365,6 @@ tf_cc_test(
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@local_tsl//tsl/concurrency:ref_count",
"@local_tsl//tsl/platform:env",
"@local_tsl//tsl/platform:status_matchers",
"@local_tsl//tsl/platform:statusor",
Expand All @@ -375,6 +374,7 @@ tf_cc_test(
"@local_xla//xla/python/ifrt:test_util",
"@local_xla//xla/python/pjrt_ifrt:tfrt_cpu_client_test_lib",
"@local_xla//xla/python/pjrt_ifrt:xla_ifrt",
"@local_xla//xla/tsl/concurrency:ref_count",
],
)

Expand Down Expand Up @@ -412,14 +412,14 @@ tf_cc_test(
"@llvm-project//mlir:AllPassesAndDialects",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:Parser",
"@local_tsl//tsl/concurrency:ref_count",
"@local_tsl//tsl/platform:env",
"@local_tsl//tsl/platform:statusor",
"@local_tsl//tsl/platform:tstring",
"@local_xla//xla/hlo/ir:hlo",
"@local_xla//xla/python/ifrt",
"@local_xla//xla/python/ifrt:test_util",
"@local_xla//xla/python/pjrt_ifrt:tfrt_cpu_client_test_lib",
"@local_xla//xla/tsl/concurrency:ref_count",
"@tf_runtime//:basic_kernels_alwayslink",
"@tf_runtime//:core_runtime_alwayslink",
"@tf_runtime//:test_kernels_alwayslink",
Expand Down
1 change: 1 addition & 0 deletions tensorflow/core/tfrt/ifrt/ifrt_loaded_variable_registry.cc
Expand Up @@ -24,6 +24,7 @@ limitations under the License.
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "absl/synchronization/mutex.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "tsl/platform/statusor.h"

namespace tensorflow {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/ifrt/ifrt_loaded_variable_registry.h
Expand Up @@ -25,7 +25,7 @@ limitations under the License.
#include "tensorflow/compiler/mlir/tfrt/transforms/ifrt/ifrt_types.h"
#include "xla/python/ifrt/array.h"
#include "xla/python/ifrt/future.h"
#include "tsl/concurrency/ref_count.h"
#include "xla/tsl/concurrency/ref_count.h"

namespace tensorflow {
namespace ifrt_serving {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/ifrt/ifrt_loaded_variable_utils.cc
Expand Up @@ -29,6 +29,7 @@ limitations under the License.
#include "xla/python/ifrt/array.h"
#include "xla/python/ifrt/client.h"
#include "xla/python/ifrt/future.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "tensorflow/core/framework/resource_handle.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
Expand All @@ -38,7 +39,6 @@ limitations under the License.
#include "tensorflow/core/tfrt/ifrt/sharding_utils.h"
#include "tensorflow/core/tfrt/mlrt/interpreter/future.h"
#include "tensorflow/core/tfrt/utils/fallback_tensor.h"
#include "tsl/concurrency/ref_count.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/statusor.h"
#include "tsl/platform/threadpool.h"
Expand Down
Expand Up @@ -28,6 +28,7 @@ limitations under the License.
#include "xla/python/ifrt/device.h"
#include "xla/python/ifrt/future.h"
#include "xla/python/ifrt/test_util.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "xla/xla_data.pb.h"
#include "tensorflow/core/framework/resource_handle.h"
#include "tensorflow/core/framework/tensor.h"
Expand All @@ -40,7 +41,6 @@ limitations under the License.
#include "tensorflow/core/tfrt/ifrt/ifrt_restore_tensor_registry.h"
#include "tensorflow/core/tfrt/mlrt/interpreter/future.h"
#include "tensorflow/core/tfrt/utils/fallback_tensor.h"
#include "tsl/concurrency/ref_count.h"
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/env.h"
#include "tsl/platform/status_matchers.h"
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/ifrt/ifrt_model_context.cc
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "xla/python/ifrt/array.h"
#include "tsl/concurrency/ref_count.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "tsl/platform/threadpool.h"

namespace tensorflow {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/ifrt/ifrt_model_context.h
Expand Up @@ -29,11 +29,11 @@ limitations under the License.
#include "tensorflow/compiler/tf2xla/xla_helpers.h"
#include "xla/python/ifrt/array.h"
#include "xla/python/ifrt/client.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "tensorflow/core/common_runtime/device_mgr.h"
#include "tensorflow/core/tfrt/ifrt/ifrt_executable_registry.h"
#include "tensorflow/core/tfrt/ifrt/ifrt_loaded_variable_registry.h"
#include "tensorflow/core/tfrt/ifrt/ifrt_restore_tensor_registry.h"
#include "tsl/concurrency/ref_count.h"
#include "tsl/platform/threadpool.h"
#include "tfrt/host_context/concurrent_work_queue.h" // from @tf_runtime

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/ifrt/ifrt_serving_executable.cc
Expand Up @@ -56,6 +56,7 @@ limitations under the License.
#include "xla/python/pjrt_ifrt/xla_compiler.h"
#include "xla/service/computation_placer.h"
#include "xla/shape.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "xla/xla_data.pb.h"
#include "tensorflow/core/common_runtime/device_mgr.h"
#include "tensorflow/core/framework/function.pb.h"
Expand All @@ -68,7 +69,6 @@ limitations under the License.
#include "tensorflow/core/tfrt/ifrt/ifrt_tensor_utils.h"
#include "tensorflow/core/tfrt/ifrt/sharding_utils.h"
#include "tensorflow/core/tfrt/ifrt/tf_host_callback.h"
#include "tsl/concurrency/ref_count.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/statusor.h"
#include "tsl/platform/tstring.h"
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/ifrt/ifrt_serving_executable.h
Expand Up @@ -40,14 +40,14 @@ limitations under the License.
#include "xla/python/ifrt/future.h"
#include "xla/python/ifrt/shape.h"
#include "xla/python/ifrt/sharding.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "xla/xla_data.pb.h"
#include "tensorflow/core/common_runtime/device_mgr.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/protobuf/tpu/compile_metadata.pb.h"
#include "tensorflow/core/tfrt/ifrt/ifrt_loaded_variable_registry.h"
#include "tensorflow/core/tfrt/ifrt/tf_host_callback.h"
#include "tsl/concurrency/ref_count.h"
#include "tsl/platform/threadpool.h"

namespace tensorflow {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/ifrt/ifrt_serving_executable_test.cc
Expand Up @@ -40,6 +40,7 @@ limitations under the License.
#include "xla/python/ifrt/client.h"
#include "xla/python/ifrt/future.h"
#include "xla/python/ifrt/test_util.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "tensorflow/core/common_runtime/device_mgr.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_matcher.h"
Expand All @@ -51,7 +52,6 @@ limitations under the License.
#include "tensorflow/core/tfrt/ifrt/ifrt_loaded_variable_registry.h"
#include "tensorflow/core/tfrt/ifrt/sharding_utils.h"
#include "tensorflow/core/tfrt/ifrt/tf_host_callback.h"
#include "tsl/concurrency/ref_count.h"
#include "tsl/platform/env.h"
#include "tsl/platform/statusor.h"
#include "tsl/platform/threadpool.h"
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/ifrt/sharding_utils.cc
Expand Up @@ -45,6 +45,7 @@ limitations under the License.
#include "xla/python/ifrt/shape.h"
#include "xla/python/ifrt/sharding.h"
#include "xla/python/pjrt_ifrt/xla_sharding.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
Expand All @@ -54,7 +55,6 @@ limitations under the License.
#include "tensorflow/core/platform/statusor.h"
#include "tensorflow/core/tfrt/ifrt/ifrt_tensor_utils.h"
#include "tensorflow/core/tpu/kernels/sharding_utils.h"
#include "tsl/concurrency/ref_count.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/statusor.h"
#include "tsl/platform/threadpool.h"
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/ifrt/sharding_utils.h
Expand Up @@ -23,9 +23,9 @@ limitations under the License.
#include "xla/python/ifrt/client.h"
#include "xla/python/ifrt/device.h"
#include "xla/python/ifrt/future.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/platform/statusor.h"
#include "tsl/concurrency/ref_count.h"
#include "tsl/platform/threadpool.h"

namespace tensorflow {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/ifrt/sharding_utils_test.cc
Expand Up @@ -32,13 +32,13 @@ limitations under the License.
#include "xla/python/ifrt/sharding.h"
#include "xla/python/ifrt/test_util.h"
#include "xla/python/pjrt_ifrt/xla_sharding.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "xla/xla_data.pb.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_matcher.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/tensor_testutil.h"
#include "tensorflow/core/tfrt/ifrt/ifrt_tensor_utils.h"
#include "tsl/concurrency/ref_count.h"
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/env.h"
#include "tsl/platform/status_matchers.h"
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/core/tfrt/mlrt/interpreter/BUILD
Expand Up @@ -124,7 +124,7 @@ cc_library(
":future",
":value",
"@com_google_absl//absl/log:check",
"@local_tsl//tsl/concurrency:async_value",
"@local_xla//xla/tsl/concurrency:async_value",
"@tf_runtime//:async_value",
],
)
Expand Down Expand Up @@ -223,7 +223,7 @@ tf_cc_test(
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_googletest//:gtest_main",
"@local_tsl//tsl/concurrency:async_value",
"@local_tsl//tsl/platform:status_matchers",
"@local_xla//xla/tsl/concurrency:async_value",
],
)
4 changes: 2 additions & 2 deletions tensorflow/core/tfrt/mlrt/interpreter/async_handle.cc
Expand Up @@ -17,9 +17,9 @@ limitations under the License.
#include <memory>
#include <utility>

#include "xla/tsl/concurrency/async_value_ref.h"
#include "xla/tsl/concurrency/chain.h"
#include "tensorflow/core/tfrt/mlrt/interpreter/context.h"
#include "tsl/concurrency/async_value_ref.h"
#include "tsl/concurrency/chain.h"

namespace mlrt {

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/mlrt/interpreter/future_test.cc
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
#include <gtest/gtest.h>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "tsl/concurrency/async_value_ref.h"
#include "xla/tsl/concurrency/async_value_ref.h"
#include "tsl/platform/status_matchers.h"

namespace mlrt {
Expand Down
1 change: 1 addition & 0 deletions tensorflow/core/tfrt/mlrt/kernel/BUILD
Expand Up @@ -78,6 +78,7 @@ cc_library(
"@local_tsl//tsl/platform:tstring",
"@local_xla//xla:xla_data_proto_cc",
"@local_xla//xla/python/ifrt",
"@local_xla//xla/tsl/concurrency:ref_count",
"@tf_runtime//:hostcontext",
],
alwayslink = 1,
Expand Down
1 change: 1 addition & 0 deletions tensorflow/core/tfrt/mlrt/kernel/ifrt_ops_kernel.cc
Expand Up @@ -27,6 +27,7 @@ limitations under the License.
#include "absl/types/span.h"
#include "tensorflow/compiler/mlir/tfrt/transforms/ifrt/ifrt_types.h"
#include "xla/python/ifrt/future.h"
#include "xla/tsl/concurrency/ref_count.h"
#include "xla/xla_data.pb.h"
#include "tensorflow/core/framework/attr_value.pb.h"
#include "tensorflow/core/framework/device_base.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/mlir/runtime/transforms/BUILD
Expand Up @@ -192,6 +192,7 @@ cc_library(
"//xla/runtime:memref_view",
"//xla/runtime:tracing",
"//xla/runtime:type_id",
"//xla/tsl/concurrency:async_value",
"@com_google_absl//absl/types:span",
"@eigen_archive//:eigen3",
"@llvm-project//llvm:Support",
Expand All @@ -202,7 +203,6 @@ cc_library(
"@llvm-project//mlir:LLVMCommonConversion",
"@llvm-project//mlir:LLVMDialect",
"@llvm-project//mlir:Support",
"@local_tsl//tsl/concurrency:async_value",
],
)

Expand Down

0 comments on commit af3028d

Please sign in to comment.