[XLA:Python] Remove deprecated overloads for infeed/outfeed APIs.

PiperOrigin-RevId: 293056640
Change-Id: I4f6fc0aec76870ce0a3b8996485075c7cc66fdc4
diff --git a/tensorflow/compiler/xla/python/local_client.cc b/tensorflow/compiler/xla/python/local_client.cc
index 2c3fcf5..67a3e0a 100644
--- a/tensorflow/compiler/xla/python/local_client.cc
+++ b/tensorflow/compiler/xla/python/local_client.cc
@@ -268,22 +268,6 @@
   }
 }
 
-Status PyLocalClient::TransferToInfeed(const LiteralSlice& literal,
-                                       std::shared_ptr<Device> device) {
-  TF_ASSIGN_OR_RETURN(LocalDeviceState * local_device,
-                      device->GetLocalDeviceState());
-  return client_->TransferToInfeedLocal(literal,
-                                        local_device->device_ordinal());
-}
-
-StatusOr<Literal> PyLocalClient::TransferFromOutfeed(
-    const Shape& shape, std::shared_ptr<Device> device) {
-  TF_ASSIGN_OR_RETURN(LocalDeviceState * local_device,
-                      device->GetLocalDeviceState());
-  return client_->TransferFromOutfeedLocal(shape,
-                                           local_device->device_ordinal());
-}
-
 StatusOr<DeviceAssignment> PyLocalClient::GetDefaultDeviceAssignment(
     int num_replicas, int num_partitions) const {
   return client_->backend().computation_placer()->AssignDevices(num_replicas,
diff --git a/tensorflow/compiler/xla/python/local_client.h b/tensorflow/compiler/xla/python/local_client.h
index 9baece3..ecbc9bf 100644
--- a/tensorflow/compiler/xla/python/local_client.h
+++ b/tensorflow/compiler/xla/python/local_client.h
@@ -129,11 +129,6 @@
       std::unique_ptr<tensorflow::Allocator> host_memory_allocator);
   virtual ~PyLocalClient() = default;
 
-  Status TransferToInfeed(const LiteralSlice& literal,
-                          std::shared_ptr<Device> device);
-  StatusOr<Literal> TransferFromOutfeed(const Shape& shape,
-                                        std::shared_ptr<Device> device);
-
   virtual StatusOr<DeviceAssignment> GetDefaultDeviceAssignment(
       int num_replicas, int num_partitions) const;
 
diff --git a/tensorflow/compiler/xla/python/xla.cc b/tensorflow/compiler/xla/python/xla.cc
index 15a6052..c8632d3 100644
--- a/tensorflow/compiler/xla/python/xla.cc
+++ b/tensorflow/compiler/xla/python/xla.cc
@@ -589,54 +589,6 @@
              }
              return result;
            })
-      // TODO(phawkins): delete these methods in favor of the versions on Device
-      .def("TransferToInfeed",
-           [](PyLocalClient* client, const LiteralSlice& literal,
-              int device_ordinal) {
-             GlobalPyRefManager()->CollectGarbage();
-             py::gil_scoped_release gil_release;
-             TF_ASSIGN_OR_RETURN(std::shared_ptr<Device> device,
-                                 LookupDeviceOrdinal(client, device_ordinal,
-                                                     "TransferToInfeed"));
-             return client->TransferToInfeed(literal, device);
-           })
-      .def("TransferToInfeed",
-           [](PyLocalClient* client, const LiteralSlice& literal,
-              std::shared_ptr<Device> device) {
-             GlobalPyRefManager()->CollectGarbage();
-             py::gil_scoped_release gil_release;
-             return client->TransferToInfeed(literal, device);
-           })
-      // TODO(phawkins): delete these methods in favor of the versions on Device
-      .def("TransferFromOutfeed",
-           [](PyLocalClient* client, const Shape& shape,
-              int device_ordinal) -> StatusOr<py::object> {
-             GlobalPyRefManager()->CollectGarbage();
-             std::shared_ptr<Literal> literal_shared;
-             {
-               py::gil_scoped_release gil_release;
-               TF_ASSIGN_OR_RETURN(std::shared_ptr<Device> device,
-                                   LookupDeviceOrdinal(client, device_ordinal,
-                                                       "TransferFromOutfeed"));
-               TF_ASSIGN_OR_RETURN(Literal literal,
-                                   client->TransferFromOutfeed(shape, device));
-               literal_shared = std::make_shared<Literal>(std::move(literal));
-             }
-             return LiteralToPython(std::move(literal_shared));
-           })
-      .def("TransferFromOutfeed",
-           [](PyLocalClient* client, const Shape& shape,
-              std::shared_ptr<Device> device) -> StatusOr<py::object> {
-             GlobalPyRefManager()->CollectGarbage();
-             std::shared_ptr<Literal> literal_shared;
-             {
-               py::gil_scoped_release gil_release;
-               TF_ASSIGN_OR_RETURN(Literal literal,
-                                   client->TransferFromOutfeed(shape, device));
-               literal_shared = std::make_shared<Literal>(std::move(literal));
-             }
-             return LiteralToPython(std::move(literal_shared));
-           })
       .def("CreateChannelHandle",
            [](PyLocalClient* client) {
              return client->client()->CreateChannelHandle();