-
Notifications
You must be signed in to change notification settings - Fork 265
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
Remove use of local rank in trainers #926
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
|
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! Looks great!
# TODO: dealing with local rank is dangerous | ||
# T201111838 remove this and use CUDA_VISIBILE_DEVICES instead so trainers don't need to know about which devie to use | ||
local_rank: int, | ||
local_rank: int, # DEPRECATED, DO NOT USE |
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.
can we just remove this altogether and let if fail if used? or does it cause deeper issues if we do?
Remove use local_rank to set cuda devices all together. Previously this was behind a feature flag but instead of maintaining the 2 versions, its easier to just consolidate since the local multiple-GPU runs are bugged right now and multiple ranks can be assigned on the same device. Each rank now will only see their local GPU (GPU-0) and not 8 devices.
After this there shouldn't be any code that tries to assign a cuda device that isn't "cuda" or "cuda:0".
To sanity check: