Solved by FenixFromTheShadows in post #2 
              
              
                OK actually I figured it out. The function is copy_. 
torch::Tensor result = foo(); // a complicated computation function, parameters omitted
std::vector<double> v(100);
torch::Tensor result_copy = from_blob(v.data(), {100}, torch::kDouble);
result_copy.copy_(result); // this does the "in-place" cop…