Skip to content
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

Allowing Single GPU with ID 0 - Bug Fix #679

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JuarezCulau
Copy link

This pull request addresses a bug that currently prevents the utilization of a single GPU with ID 0. Currently, the code includes a conditional check that inadvertently prevents the use of GPU 0 by not accounting for cases when the user explicitly passes GPU ID 0. The check is performed using the statement if gpu_id:, which unintentionally blocks GPU 0.

To resolve this issue, I propose modifying the check statement to if gpu_id and gpu_id != 0:. This adjustment ensures that the code will allow the use of GPU 0 while still appropriately handling cases where gpu_id is None.

This fix not only corrects the bug but also ensures compatibility with setups that involve a single GPU with ID 0. The modified condition will now consider both the non-null value of gpu_id and its non-equality to 0, thus enabling the correct behavior for single GPUs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant