Hi, I found that forwarding the same tensor on cpu and gpu with a model on cpu yield different results.
import torch
fc = torch.nn.Linear(2, 2)
t = torch.tensor([[0.5, 0.3]])
print(fc(t))
print(fc(t.cuda()))

The result of fc(t) is correct while the result of fc(t.cuda()) is wrong. After a little digging, I found it is torch.addmm() that cause this issue. Though forwarding a gpu tensor with a cpu model generally makes little sense, my expectation is that pytorch can either throw an error (saying input device mismatch) or give the correct result.