This PR adds checks for all dimensions of new sizes/strides after insertion to make sure they don't exceed the max value. Without this PR, it only checks the inserted dimension, and ignores the case that inter size becomes intra size after insertion which could exceed the max value.
This PR adds checks for all dimensions of new sizes/strides after insertion to make sure they don't exceed the max value. Without this PR, it only checks the inserted dimension, and ignores the case that inter size becomes intra size after insertion which could exceed the max value.