-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Deprecate auto_select_gpus
and enable it by default
#13356
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
Conversation
for more information, see https://pre-commit.ci
@@ -517,7 +515,7 @@ def _set_parallel_devices_and_init_accelerator(self) -> None: | |||
self._gpus = self._devices_flag if not self._gpus else self._gpus | |||
self._tpu_cores = self._devices_flag if not self._tpu_cores else self._tpu_cores | |||
|
|||
self._set_devices_flag_if_auto_select_gpus_passed() | |||
self._set_devices_flag_if_count_passed() |
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.
We could merge this with Accelerator.parse_devices
(see line below). I.e., we would implement GPUAccelerator.parse_devices
by calling the pick_multiple_gpus
function there.
Any thoughts/objections on this?
@@ -49,20 +49,6 @@ def determine_root_gpu_device(gpus: List[_DEVICE]) -> Optional[_DEVICE]: | |||
return root_gpu | |||
|
|||
|
|||
def _parse_devices( |
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.
removed dead code (unrelated to this PR)
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
for more information, see https://pre-commit.ci
Is this blocked or something? |
This just needs more work. Requires to look at tests etc. Need to discuss priority and then add to sprint. |
What does this PR do?
Fixes #13079, #10535
Before
Now:
Does your PR introduce any breaking changes? If yes, please list them.
Yes. The
auto_select_gpus
argument in Trainer will be removed in v1.9. Users ofauto_select_gpus
can just remove the flag and still make use of it as it is now turned on by default.Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃