Skip to content

Commit 05f430e

Browse files
committed
fix device assignment
1 parent 9050e3a commit 05f430e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch_geometric/utils/_to_dense_adj.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def to_dense_adj(
7070
perm = batch.argsort()
7171
batch = batch[perm]
7272
new_index_map = torch.empty_like(perm)
73-
new_index_map[perm] = torch.arange(perm.size(0))
73+
new_index_map[perm] = torch.arange(perm.size(0), device=perm.device)
7474
edge_index = new_index_map[edge_index]
7575

7676
one = batch.new_ones(batch.size(0))

0 commit comments

Comments
 (0)