Skip to content

Better error messages for blas ops on torch.cuda.LongTensor #4157

@zou3519

Description

@zou3519

Reported at https://discuss.pytorch.org/t/runtimeerror-unimplemented-data-type/11127.

import torch
from torch.autograd import Variable
x = Variable(torch.zeros(3, 3).long().random_(0, 10).cuda())
y = Variable(torch.zeros(3, 3).long().random_(0, 10).cuda())
torch.mm(x, y.t())
>>>
RuntimeError                              Traceback (most recent call last)
<ipython-input-3-472380edcc50> in <module>()
      3 x = Variable(torch.zeros(3, 3).long().random_(0, 10).cuda())
      4 y = Variable(torch.zeros(3, 3).long().random_(0, 10).cuda())
----> 5 torch.mm(x, y.t())

RuntimeError: unimplemented data type at /opt/conda/conda-bld/pytorch_1512386481460/work/torch/lib/THC/generic/THCTensorMathBlas.cu:377

unimplemented data type is a little confusing.

Will take care of this later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions