Add int32_t range check in packed_accessor32 in PyTorch TensorBase (#86085)
Summary:
As ajtulloch suggested, we can make tensor.packed_accessor32<...>() raise an exception if tensor.numel() > std::numeric_limits<uint32_t>::max().
Trade-off: run-time check overhead (one-time) when doing `packed_accessor32` accessor.
Differential Revision: D39996275
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86085
Approved by: https://github.com/ngimel