Repository navigation
Commit d48f2d6
authored
Fix squeeze offset for sliced views (#2933)
Squeezing a sliced view now retains its data offset instead of reading
from the start of the underlying tensor. Both squeeze overloads reuse
the existing offset helper; expressions without a data interface keep
their zero-offset fallback.
Fixes #2834.
Validation in Docker (Ubuntu 24.04, clang 18.1.3, C++20): the added
regression failed before the fix with `{1,2}` instead of `{2,3}`. After
the fix, the focused squeeze tests passed in both row-major and
column-major configurations (2 test cases, 12 assertions each). The
modified header and test passed `clang-format-18 --dry-run --Werror`.
Co-authored-by: Tyagiquamar <Tyagiquamar@users.noreply.github.com>1 parent c9125c9 commit d48f2d6
2 files changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
540 | 546 | | |
541 | 547 | | |
542 | 548 | | |
| |||
559 | 565 | | |
560 | 566 | | |
561 | 567 | | |
562 | | - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
563 | 575 | | |
564 | 576 | | |
565 | 577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
303 | 316 | | |
304 | 317 | | |
305 | 318 | | |
| |||
0 commit comments