data -> data_ptr: upgrade the deprecated APIs (#25223)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25223
Before this PR, it shows the following warning:
```
> caffe2/aten/src/ATen/core/Tensor.h:297: UserWarning: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead.
> TORCH_WARN("Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead.");
> caffe2/aten/src/ATen/core/Tensor.h:297: UserWarning: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead.
> TORCH_WARN("Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead.");
```
After this PR, the warning message should disappear.
ghstack-source-id: 89113498
Test Plan: CI
Differential Revision: D17066471
fbshipit-source-id: e4fec964b5333ff968c8cf218286d4a8ab8dbe54