I create a cuda tensor use code like below:
auto my_tensor = torch::ones({1,3,512,512},torch::device(torch::kCUDA,0));
so how can I copy the data in a cuda memory to a cuda tensor ,or copy from cuda tensor to cuda memory directly?  What I want is to be able to complete the copy inside GPU without having to do GPU->CPU->GPU copy.