Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TPU] Correct the check for TPU device in a pod environment #6755

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
remove comment and unused var
  • Loading branch information
jiasenwu committed Mar 31, 2021
commit 9fd8ec2eb465337f46a7d3f8265e8c836789dc5a
3 changes: 1 addition & 2 deletions pytorch_lightning/utilities/xla_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ def _is_device_tpu(index) -> bool:
device = xm.xla_device()
return device.type == 'xla'

# Missing XLA Configuration
except RuntimeError as e:
except RuntimeError:
traceback.print_exc()
return False

Expand Down