-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add device_name
classmethod in Accelerator
.
#21112
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
base: master
Are you sure you want to change the base?
Conversation
device_name
classmethod in Accelerator
.device_name
classmethod in Accelerator
.
This comment was marked as off-topic.
This comment was marked as off-topic.
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.
How would you handle heterogeneous gpu types? E.g. say I have one 3090 and one 4090 in my workstation. This doesn't handle it at all.
Hi @justusschock , based on the change, the output should look something like
that being said, if the setup is more complex - for example 2 x 3090 and 1 x 4090 - the current output might not fully reflect that. |
On second thought, I may have oversimplified the question. It looks like the current implementation could cause issues with the DDP training strategy, since it tries to access a non-existent device ID on rank zero. Thanks for your review @Borda & @justusschock , I’ll mark this PR as WIP for now. Any further suggestions are welcome~ |
@GdoongMathew I think that's fine. it's just important to reflect all available gpu types as that might impact memory etc. |
To follow up on my own concern: it seems the device_ids property refers to devices on the current node, not all devices across the world view. So the current implementation probably won’t cause any issues, aside from not being able to list device types from other nodes. |
What does this PR do?
Fixes #17355
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:
Reviewer checklist
📚 Documentation preview 📚: https://pytorch-lightning--21112.org.readthedocs.build/en/21112/