Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
466aa57a
Unverified
Commit
466aa57a
authored
Jun 10, 2020
by
Lysandre Debut
Committed by
GitHub
Jun 10, 2020
Browse files
Don't init TPU device twice (#4916)
parent
ef2dcdcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
src/transformers/file_utils.py
src/transformers/file_utils.py
+1
-3
No files found.
src/transformers/file_utils.py
View file @
466aa57a
...
...
@@ -71,9 +71,7 @@ except ImportError:
try
:
import
torch_xla.core.xla_model
as
xm
tpu_device
=
xm
.
xla_device
()
import
torch_xla.core.xla_model
as
xm
# noqa: F401
if
_torch_available
:
_torch_tpu_available
=
True
# pylint: disable=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment