From df8dddb7efed2b119aad487839b92cd1cf8b852e Mon Sep 17 00:00:00 2001 From: Peter Hawkins Date: Mon, 13 May 2019 14:21:23 -0700 Subject: [PATCH] [XLA:Python] Remove some backward compatibility code from the Python API. Preceding changes have already broken compatibility with older JAX releases, so we can remove this compatibility code also. PiperOrigin-RevId: 248009182 --- tensorflow/compiler/xla/python/xla_client.py | 24 -------------------- 1 file changed, 24 deletions(-) diff --git a/tensorflow/compiler/xla/python/xla_client.py b/tensorflow/compiler/xla/python/xla_client.py index c529e381175..39a52b5d5f8 100644 --- a/tensorflow/compiler/xla/python/xla_client.py +++ b/tensorflow/compiler/xla/python/xla_client.py @@ -185,30 +185,6 @@ def get_local_backend(name=None): return list(backends.values())[-1] -# Compatibility shims to support older clients. - -_default_platform_name = None - - -def XlaLocalBackend(): - # Deprecated. Use get_local_backend(platform_name). - return get_local_backend(_default_platform_name) - - -def initialize_platform_name(platform_name): - """Deprecated. Use get_local_backend(platform_name).""" - if platform_name == 'Host': - platform_name = 'cpu' - elif platform_name == 'CUDA': - platform_name = 'gpu' - - # Make sure the platform is valid by trying to instantiate it. - get_local_backend(platform_name) - - global _default_platform_name - _default_platform_name = platform_name - - class OpMetadata(object): """Python representation of a xla.OpMetadata protobuf.""" __slots__ = ('op_type', 'op_name', 'source_file', 'source_line')