Do not use unsafe restriding for subclasses (#87610)
This helps convert some accuracy errors into runtime errors,
which makes it easier to debug.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87610
Approved by: https://github.com/albanD