Skip to content

Commit

Permalink
Change isinstance test in xla_bridge.py to not explicitly name xla_cl…
Browse files Browse the repository at this point in the history
…ient.Backend. (#2868)

Change in preparation for removing xla_client.Backend in favor of the underlying C++ classes.
  • Loading branch information
hawkinsp committed Apr 28, 2020
1 parent 5fe6b06 commit c0023f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jax/lib/xla_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _get_tpu_driver_backend(platform):
def get_backend(platform=None):
# TODO(mattjj,skyewm): remove this input polymorphism after we clean up how
# 'backend' values are handled
if isinstance(platform, xla_client.Backend):
if not isinstance(platform, (type(None), str)):
return platform

with _backend_lock:
Expand Down

0 comments on commit c0023f4

Please sign in to comment.