pytorch_sparse icon indicating copy to clipboard operation
pytorch_sparse copied to clipboard

spmm_mean error with large input

Open ilil96 opened this issue 3 years ago • 1 comments
trafficstars

import torch
from torch_sparse.matmul import spmm_mean 

adj = torch.load('adj')
x = torch.rand(adj.size(1), 256, device='cuda:0')

out = spmm_mean(adj, x)
print(out)

Illegal memory access error comes out when I run torch_sparse.matmul.spmm_mean with large input on GPU. The above is the test code that reproduces the error. In the test code, the size of sparse tensor (adj) is (95112, 8643286) and the randomly generated dense tensor ('x') which would be fed into spmm_mean with the sparse tensor is (8643286, 256). When I try to access the output tensor of spmm_mean, which is 'out' in the code, with print or any other operation, I get error message like 'RuntimeError: CUDA error: an illegal memory access was encountered'. The code works well when I use somewhat smaller dense tensor like (8643286, 128).

I attach the serialized binary file of the sparse tensor that I'm using for testing (link: adj.zip). You can download, unzip and load with torch.load call as the code above.

ilil96 avatar Apr 20 '22 08:04 ilil96

I can reproduce this, thank you! Will investigate further.

rusty1s avatar Apr 21 '22 06:04 rusty1s

This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?

github-actions[bot] avatar Oct 19 '22 02:10 github-actions[bot]