From the error message, it sounds like t1 is a CPU tensor while t2 is a CUDA tensor (or maybe the other way around). Could you check with t1.is_cuda, t2.is_cuda?
For this to work both t1 and t2 should be on the GPU.