torch.cat shouldn’t change the cuda variable to non-cuda variable. I suspect you are doing something slightly unexpected here?
If you give a small snippet of 10 lines to reproduce the issue, i can investigate.