Avoid a TensorIterator/Loops reinterpret_cast in a test. (#39246)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39246
This was found by adding some error checking in https://github.com/pytorch/pytorch/pull/38817, but that needs more work to be able to merge, so we just do a one-off fix here.
Test Plan: Imported from OSS
Differential Revision: D21786761
Pulled By: gchanan
fbshipit-source-id: e4ecf6506c8649214d0fddfcca2ada6afa339d3b