Test reading `__cuda_array_interface__` inferred strides. (#31451)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31451
The PR that fixed this, https://github.com/pytorch/pytorch/pull/24947, didn't add a test.
Fixes: https://github.com/pytorch/pytorch/issues/31443
Test Plan: Imported from OSS
Differential Revision: D19170020
Pulled By: gchanan
fbshipit-source-id: bdbf09989ac8a61b1b70bb1ddee103caa8ef435b