Why EdgeSamplerInput moves data to cpu? #9266
Unanswered
johnarevalo
asked this question in
Q&A
Replies: 1 comment
-
Thanks for reporting. It looks like loaders are a bit fragile if you specify CUDA as the default device. I will look into this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When
torch.set_default_device('cuda:0')
, iterating aLinkNeighborLoader
object raises:If I add
generator=torch.Generator(device='cuda:0')
to theLinkNeighborLoader
initialization, the error changes to:in 154 line
index
tensor is incuda:0
butself.row
is incpu
. It seems that is forced in:pytorch_geometric/torch_geometric/sampler/base.py
Lines 133 to 139 in 36bc925
What is the reason to enforce this?
Beta Was this translation helpful? Give feedback.
All reactions