Fix missing symbol issue when USE_NUMPY=False (#81967)
Fixes missing symbol issue if torch is built with USE_NUMPY=False.
- `tensor_to_numpy` signature changed.
- `warn_numpy_not_writeable` missed.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81967
Approved by: https://github.com/ezyang