-
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
Deprecate DeviceType
in favor of _AcceleratorType
#10503
Conversation
DeviceType
Enum to AcceleratorType
DeviceType
in favor of _AcceleratorType
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
if ( | ||
trainer is not None | ||
and trainer.amp_backend == AMPType.NATIVE | ||
and trainer._device_type != _AcceleratorType.TPU |
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.
and trainer._device_type != _AcceleratorType.TPU | |
and not isinstance(trainer.accelerator, TPUAccelerator) |
Outside of the trainer/accelerator connector, this is how we want to check for the accelerator type in the future. Just a reminder, let's update this in follow up PRs
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.
Yup!
Codecov Report
@@ Coverage Diff @@
## master #10503 +/- ##
=======================================
Coverage 92% 92%
=======================================
Files 177 177
Lines 16404 16411 +7
=======================================
+ Hits 15059 15066 +7
Misses 1345 1345 |
What does this PR do?
Part of #9932
Does your PR introduce any breaking changes? If yes, please list them.
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃
cc @Borda @justusschock @awaelchli @akihironitta