-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Refactor XLA and TPU checks across codebase #14550
Conversation
feb6d55
to
b212a48
Compare
@carmocca just to be sure, you are not mixing up tpu_available with xla_available? These are two different things. One can have xla available on a machine without tpus. |
@awaelchli In this PR, In most places, we want to check I don't think I mixed things up, but there might be mistakes. Tests are not fixed yet. |
0d2f933
to
a101345
Compare
XLADeviceUtils
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #14550 +/- ##
=========================================
+ Coverage 83% 85% +2%
=========================================
Files 396 275 -121
Lines 29007 21166 -7841
=========================================
- Hits 24032 17919 -6113
+ Misses 4975 3247 -1728 |
This reverts commit 9b117d5.
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.
LGTM !
What does this PR do?
Move XLA utilities together with the TPUAccelerator
Deprecate one more redundant utility function
Fix mocks in tests via fixtures
Follow-up to #14514
Part of #11826
Part of #12786
Closes #14982, #14979
Does your PR introduce any breaking changes? If yes, please list them.
None
Before submitting
PR review
cc @Borda @justusschock @awaelchli @rohitgr7 @tchaton