fixing sorting in stride indices (#63940)
Summary:
Updating `computeStrideProps` logic to break ties on stride_indices.
For two dimension with identical stride, the dimension with size-1 should be considered as the faster dimension. Otherwise, its stride should be the product of existing stride and the size of the other dimension.
Note that there's still inconsistency between eager memory_format and stride_properties in JIT, this is a design issue due to the ambiguity on size-1 stride. One example showing this failing test has been disabled in the added cpp test
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63940
Reviewed By: albanD
Differential Revision: D31227448
Pulled By: dzhulgakov
fbshipit-source-id: 51e3cd903757bef55d3158c057f9444d0cff7d2a