[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
This commit is contained in:
parent
5f5340ca3e
commit
df8dddb7ef
@ -185,30 +185,6 @@ def get_local_backend(name=None):
|
|||||||
return list(backends.values())[-1]
|
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):
|
class OpMetadata(object):
|
||||||
"""Python representation of a xla.OpMetadata protobuf."""
|
"""Python representation of a xla.OpMetadata protobuf."""
|
||||||
__slots__ = ('op_type', 'op_name', 'source_file', 'source_line')
|
__slots__ = ('op_type', 'op_name', 'source_file', 'source_line')
|
||||||
|
Loading…
Reference in New Issue
Block a user