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

Support for torch.mm with Sparse Half Tensors? "addmm_sparse_cuda" not implemented for Half #907

Closed
sbonner0 opened this issue Jul 7, 2020 · 1 comment

Comments

@sbonner0
Copy link

sbonner0 commented Jul 7, 2020

Hi,

I am trying to perform sparse and dense matrix multiplication using half precision tensors in pytorch.

The following code:

import torch
a = torch.randn(3,2).half().cuda()
i = torch.LongTensor([[0, 1, 1],  [2, 0, 2]]) 
v = torch.FloatTensor([3, 4, 5]) 
b = torch.sparse.FloatTensor(i, v, torch.Size([2,3])).half().cuda()
c = torch.spmm(b, a)

will produce this error: RuntimeError: "addmm_sparse_cuda" not implemented for 'Half'

Is there anyway to solve this?

I am unsure if this is a Apex or Pytorch issue so I thought I would post it in both places.

@sbonner0
Copy link
Author

This is an issue with Pytorch and not Apex itself - see this issue: pytorch/pytorch#41069

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant