From b89b28f2da640a429cd405ef116d847c90c74ee1 Mon Sep 17 00:00:00 2001 From: Sergei Lebedev Date: Wed, 8 Jan 2025 06:55:38 -0800 Subject: [PATCH] [pjrt] Removed unused CreateDeviceToHostChannelHandle, CreateChannelHandle and SupportsSendRecvCallbacks PiperOrigin-RevId: 713276521 --- xla/pjrt/cpu/cpu_client.h | 7 ------- xla/pjrt/pjrt_c_api_client.h | 16 ---------------- xla/pjrt/pjrt_client.h | 13 ------------- xla/pjrt/pjrt_stream_executor_client.h | 7 ------- xla/pjrt/tf_pjrt_client.h | 6 ------ 5 files changed, 49 deletions(-) diff --git a/xla/pjrt/cpu/cpu_client.h b/xla/pjrt/cpu/cpu_client.h index 2a1517a1b53fc..e325e15e29137 100644 --- a/xla/pjrt/cpu/cpu_client.h +++ b/xla/pjrt/cpu/cpu_client.h @@ -202,13 +202,6 @@ class TfrtCpuClient final : public PjRtClient { std::function on_delete_callback, std::optional stream) override; - absl::StatusOr CreateChannelHandle() override { - return Unimplemented("CreateChannelHandle not implemented."); - } - absl::StatusOr CreateDeviceToHostChannelHandle() override { - return Unimplemented("CreateDeviceToHostChannelHandle not implemented."); - } - absl::Status Defragment() override { return Unimplemented("Defragment not implemented."); } diff --git a/xla/pjrt/pjrt_c_api_client.h b/xla/pjrt/pjrt_c_api_client.h index 03e41ec398590..fe98aa5ecce39 100644 --- a/xla/pjrt/pjrt_c_api_client.h +++ b/xla/pjrt/pjrt_c_api_client.h @@ -401,28 +401,12 @@ class PjRtCApiClient : public PjRtClient { "this feature."); } - absl::StatusOr CreateChannelHandle() override { - return Unimplemented( - "PJRT C API does not support CreateChannelHandle. Please report an " - "issue at https://github.com/google/jax/issues if you need this " - "feature."); - } - - absl::StatusOr CreateDeviceToHostChannelHandle() override { - return Unimplemented( - "PJRT C API does not support CreateDeviceToHostChannelHandle. Please " - "report an issue at https://github.com/google/jax/issues if you need " - "this feature."); - } - absl::Status Defragment() override { return Unimplemented( "PJRT C API does not support Defragment. Please report an issue at " "https://github.com/google/jax/issues if you need this feature."); } - bool SupportsSendRecvCallbacks() const override { return true; } - const PJRT_Api* pjrt_c_api() const; PJRT_Client* pjrt_c_client() { return c_client_.get(); } diff --git a/xla/pjrt/pjrt_client.h b/xla/pjrt/pjrt_client.h index 0b1da9ef4660a..c0a07ae66d4e5 100644 --- a/xla/pjrt/pjrt_client.h +++ b/xla/pjrt/pjrt_client.h @@ -1070,25 +1070,12 @@ class PjRtClient { "MakeCrossHostReceiveBuffersForGather is not implemented."); } - // Create ChannelHandles for XLA send/recv. - virtual absl::StatusOr CreateChannelHandle() { - return Unimplemented("CreateChannelHandle is not implemented."); - } - virtual absl::StatusOr CreateDeviceToHostChannelHandle() { - return Unimplemented("CreateDeviceToHostChannelHandle is not implemented."); - } - // TODO(zhangqiaorjc): Experimental API to be removed. // Defragment device memory. virtual absl::Status Defragment() { return Unimplemented("Defragment is not implemented."); } - // If false, this client does not support send/recv host callbacks, and - // callers should not set the `send_callbacks` and `recv_callbacks` arguments - // in ExecuteOptions. - virtual bool SupportsSendRecvCallbacks() const { return false; } - // Return the PjRtHostMemoryForDeviceManager for this client. It can be // nullptr if the implementation does not provide one. virtual PjRtHostMemoryForDeviceManager* GetPjRtHostMemoryForDeviceManager() diff --git a/xla/pjrt/pjrt_stream_executor_client.h b/xla/pjrt/pjrt_stream_executor_client.h index 394777b07ff47..f753df6d6fcc2 100644 --- a/xla/pjrt/pjrt_stream_executor_client.h +++ b/xla/pjrt/pjrt_stream_executor_client.h @@ -394,13 +394,6 @@ class PjRtStreamExecutorClient : public PjRtClient { std::function on_delete_callback, std::optional stream) override; - absl::StatusOr CreateChannelHandle() override { - return client()->CreateChannelHandle(); - } - absl::StatusOr CreateDeviceToHostChannelHandle() override { - return client()->CreateDeviceToHostChannelHandle(); - } - // TODO(zhangqiaorjc): Experimental. Will be removed. absl::Status Defragment() override { return Unimplemented("Defragment not implemented"); diff --git a/xla/pjrt/tf_pjrt_client.h b/xla/pjrt/tf_pjrt_client.h index 8933a2482c868..49b8d5db5e92e 100644 --- a/xla/pjrt/tf_pjrt_client.h +++ b/xla/pjrt/tf_pjrt_client.h @@ -340,12 +340,6 @@ class TfPjRtClient : public PjRtClient { return wrapped_->MakeCrossHostReceiveBuffersForGather( shapes, std::move(gather_details), device, std::move(notifier)); } - absl::StatusOr CreateChannelHandle() override { - return wrapped_->CreateChannelHandle(); - } - absl::StatusOr CreateDeviceToHostChannelHandle() override { - return wrapped_->CreateDeviceToHostChannelHandle(); - } absl::StatusOr GetTopologyDescription() const override { return wrapped_->GetTopologyDescription();