[XLA:Python] Remove xla_client.Buffer class.

The only remaining method was Buffer.from_pyval. Callers should use
LocalClient.buffer_from_pyval instead.

PiperOrigin-RevId: 310248281
Change-Id: I3cca4e5ea85b7632ac5ef2f40fec488e50fe0fc8
diff --git a/tensorflow/compiler/xla/python/xla_client.py b/tensorflow/compiler/xla/python/xla_client.py
index b06cba1..d9cd906 100644
--- a/tensorflow/compiler/xla/python/xla_client.py
+++ b/tensorflow/compiler/xla/python/xla_client.py
@@ -261,44 +261,6 @@
 """
 
 
-class Buffer(object):
-  """Represents a handle to data owned by XLA.
-
-  The referent is ready for use in executing a local, compiled
-  Computation. On XLA platforms involving a device (e.g. GPU), this
-  means the referent is in device memory.
-  """
-
-  @staticmethod
-  def from_pyval(pyval, device=None, backend=None, force_copy=False):
-    """Copies the `pyval` to a freshly allocated on-device buffer."""
-    backend = backend or get_local_backend()
-    return backend.buffer_from_pyval(pyval, device, force_copy=force_copy)
-
-  # Buffer is not an instantiable type and exists only for its static methods.
-  # The underlying buffer objects are C++ object with the following
-  # API:
-  # def shape(self) -> Shape:
-  # def device(self) -> int:
-  # def delete(self):
-  # def is_deleted(self) -> bool:
-  # def block_host_until_ready(self):
-  #    """Blocks the calling thread until the buffer is ready on device."""
-  # def copy_to_host_async(self):
-  #    """Requests a copy of the buffer to the host.
-  #
-  #       Does not block waiting for the copy. Values fetched are available via
-  #       `to_py()`; the purpose of `copy_to_host_async` is to prefetch values
-  #       for subsequent `to_py()` calls, especially when requesting many values
-  #       at once.
-  #    """
-  # def to_py(self):
-  #    """Returns the value of the buffer as a Python tuple tree of ndarrays."""
-  #
-  # TODO(phawkins): remove Buffer and its static methods completely, have
-  # clients call methods on Backend to create buffers.
-
-
 def shape_from_pyval(pyval):
   """Returns a Shape that describes a tuple-tree of Numpy arrays."""