[PyTorch] Change representation of SizesAndStrides (#47508)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47508
This moves SizesAndStrides to a specialized representation
that is 5 words smaller in the common case of tensor rank 5 or less.
ghstack-source-id: 119313560
Test Plan:
SizesAndStridesTest added in previous diff passes under
ASAN + UBSAN.
Run framework overhead benchmarks. Looks more or less neutral.
Reviewed By: ezyang
Differential Revision: D24772023
fbshipit-source-id: 0a75fd6c2daabb0769e2f803e80e2d6831871316