Solved by LeviViana in post #2 
              
              
                You can copy the values pointed by gpu_mem_pointer into a. You can do something like: 
# assuming gpu_mem_pointer points to an array of n float values
auto options = ...# you'll need to set these options up depending on what you want to do
at::Tensor a = at::empty({n}, options);
auto a_ptr = a.data<f…