Test high-dimensional tensors to verify no integer overflow in
element space size calculations. Includes:
- 8D packed test with prime dimensions (180180 elements)
- 8D permuted layout test with non-monotonous strides
(memory order differs from logical order)
- Vary sequence values across all tests to avoid repetition
- Use prime numbers for distinct, coprime test data
- Add TwoSequences test for unpack_and_merge_sequences
- Remove tests of implementation details (detail::compute_element_space_size)
- Use public API (make_naive_tensor_descriptor) for all tests
- Avoid square/cube shapes that could hide row/column major bugs
- Use prime numbers for padding tests to catch index calculation errors
- Add two padding test cases: arbitrary offsets and stride slice
Old sequence sort code was showing up on build profiles. Convert it to constexpr functions for much more efficient build-time execution. The sorting is still O(N^2), but our sequences are small enough it executes quickly. This reduced compilation time of a small convolution by more than 10% and time overall time spent in the compiler on a narrow build by %6.