Golf the function contiguous_strides (#82709)
This provides a small optimisation as the code generated is different
https://godbolt.org/z/M95qcnYsf, and runs faster
https://quick-bench.com/q/HEdCSw5CBvumdLlOvX-OfvdjH0M
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82709
Approved by: https://github.com/ezyang