In the Python frontend, using torch.tensor() to copy-construct a Tensor from a Tensor is actually deprecated, and the recommended way is sourceTensor.clone().detach().requires_grad_().
In C++ frontend, currently the best way to achieve the same functionality is:
#include <torch/csrc/autograd/variable.h>

torch::Tensor a = torch::eye(3);
torch::Tensor b = torch::autograd::Variable(a.clone()).detach().set_requires_grad(true);

We are actively working on improving the API to make a.clone().detach().requires_grad_() work soon.