Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Allow user to select individual TPU core to train on #1729
Allow user to select individual TPU core to train on #1729
Changes from 12 commits
8995fbc
bd9e88c
1daadfa
e4d49d0
0ed38cd
725ef5d
c0a4f9d
f25d516
a93c6bc
b22f485
cdda262
0669ad2
2253b9f
67c5688
ec278d1
100071b
8adb0a9
34f2209
f779d01
dafe174
4c6958e
5c0db30
c7a9b4e
83e5d99
230831e
59e0b49
f22d90d
940f70b
ec300ee
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this now makes it ONLY possible to train on 1 core no? not multiple cores
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so... @lezwon ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have noticed that if
self.tpu_id
isNone
and I usexmp.spawn
, the model trains at the same speed it trains when all cores are being used. So I assumed that all cores are being used. I could add some logging to confirm. Or just add a conditional forxm.xla_device()
maybe?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ONLY when the user requests a specific TPU index should we use
model.to(xm.xla_device(self.tpu_id))
otherwise, leave it as it was.@Borda we need TPU tests to make sure this PR doesn't break functionality