But one cannot expect that with torch.autograd happens and not with torch.tensor.

You mean that if you pass a torch.Tensor to that function it won’t have the same behavior? I would expect it does (or just crash for old pytorch versions where .data did not exist on torch.Tensors).
For the migration guide, isn’t what @justusschock linked here 2 about migration for 0.4.0 what you’re looking for?