We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import torch import dgl torch.cuda.set_device(1) print(torch.cuda.current_device()) # print 1 device = 'cuda' # 'cuda:1' g = dgl.graph((torch.tensor([0, 1, 2]), torch.tensor([1, 2, 3]))).to(device) print(torch.cuda.current_device()) # print 0
The index of the current device should not be changed.
conda
pip
The text was updated successfully, but these errors were encountered:
This issue should be reopened as it has not been completely solved. @BarclayII @yzh119
import torch import dgl torch.cuda.set_device(1) print(torch.cuda.current_device()) # print 1 device = 'cuda:2' g = dgl.graph((torch.tensor([0, 1, 2]), torch.tensor([1, 2, 3]))).to(device) print(torch.cuda.current_device()) # print 2
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
🐛 Bug
To Reproduce
Expected behavior
The index of the current device should not be changed.
Environment
conda
,pip
, source): sourceAdditional context
The text was updated successfully, but these errors were encountered: