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

[Bug]DGL sparse run error message is incomplete #6393

Closed
paoxiaode opened this issue Sep 27, 2023 · 0 comments · Fixed by #6409
Closed

[Bug]DGL sparse run error message is incomplete #6393

paoxiaode opened this issue Sep 27, 2023 · 0 comments · Fixed by #6409
Assignees

Comments

@paoxiaode
Copy link
Collaborator

paoxiaode commented Sep 27, 2023

🐛 Bug

DGL sparse run error message is incomplete, make it hard to debug for user.

To Reproduce

In DGL sparse, the op like bsddmm needs all inputs are on the same device, howerver, if inputs are not on the same device, it won't report "they are not on the same device" but report Segmentation fault, it is hard to debug for user.

Steps to reproduce the behavior:

>>> import torch
>>> import dgl.sparse as dglsp
>>> indices = torch.tensor([[1, 1, 2], [2, 3, 3]])
>>> val = torch.arange(1, 4).float()
>>> A = dglsp.spmatrix(indices, val, (3, 4))
>>> X1 = torch.arange(0, 3 * 5 * 2).view(3, 5, 2).float() 
>>> X2 = torch.arange(0, 5 * 4 * 2).view(5, 4, 2).float()
>>> X1 = X1.to("cuda:0")
>>> X2 = X2.to("cuda:0")
>>> dglsp.bsddmm(A, X1, X2) // A is still on the CPU
Segmentation fault (core dumped)

Expected behavior

Should we add the input device check for the DGL sparse operator?

@frozenbugs frozenbugs added this to the 2023 Miscellaneous milestone Sep 27, 2023
@paoxiaode paoxiaode changed the title DGL sparse run error message is incomplete [BugDGL sparse run error message is incomplete Sep 27, 2023
@paoxiaode paoxiaode changed the title [BugDGL sparse run error message is incomplete [Bug]DGL sparse run error message is incomplete Sep 27, 2023
@czkkkkkk czkkkkkk mentioned this issue Oct 10, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants