Why I cannot perform dot operation on two matrices?
torch.Size([256, 31360]) torch.int16
torch.Size([1825, 31360]) torch.int16
RuntimeError: _th_dot not supported on CUDAType for Short
Same happens with
Could please sure a code that can reproduces this error?
The problem is
torch.dot() only supports 1D tensors. So, the error should be about it. The alternatives function for 2D and 3D (batch-wise) is
Here is the code I used to produce your case (although could not get your error):
a = torch.randint(high=10, size=(5, 7), dtype=torch.int16)
b = torch.randint(high=10, size=(5, 7), dtype=torch.int16)
# RuntimeError: 1D tensors expected, got 2D, 2D tensors at /pytorch/aten/src/TH/generic/THTensorEvenMoreMath.cpp:431
Maybe you are using an old version of PyTorch?