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

Allow device to be like cuda:1 #95

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

kywch
Copy link
Contributor

@kywch kywch commented Sep 1, 2024

No description provided.

@EliaPiccoli
Copy link

I think you also need to update the torch.cuda.syncronize() calls otherwise it synchs torch.cuda.current_device that - if not set - is not the actual device used.
You can use torch.cuda.synchronize(config.device) instead to synch the correct device.

@kywch
Copy link
Contributor Author

kywch commented Sep 16, 2024

@EliaPiccoli Thank you so much! I followed your suggestion.

@EliaPiccoli
Copy link

Hi, me again :D
While performing experiments I also noticed that the GPU usage should be adapted while using gpu different from 'cuda:0'.
I believe you need to update lines 501-502 adding the gpu device as argument.
In order to have the gpu information though you need to add an argument to the Utilization class, which I think should not be a problem right?

@kywch
Copy link
Contributor Author

kywch commented Sep 20, 2024

Hi Elia, nice catch and thanks! As you suggested, I passed in the device info, and now it should query the correct device.

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.

2 participants