Commit cb22460
Fix air-to-std crash for DMA ops with >4 offset/size dimensions
AIRDmaMemcpyNdToAIRRtConversion assumed DMA offsets and sizes have at
most 4 elements (matching memref rank). However, the BD optimization
pass and block layout lowering can produce DMA ops with 6+ dimensions
in offsets/sizes (e.g., 6D block layout for matmul). This caused a
SmallVector out-of-bounds access when converting to the 4D airrt
format.
Apply the same drop_front logic (already used for strides) to offsets
and sizes: when N > 4, take the last 4 elements. This matches the
hardware's 4D BD dimension limit.
Fixes crashes at large problem sizes (>1k) for both reference matmul
(run.py without --direct-codegen) and fused SwiGLU designs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 9cef756 commit cb22460
1 file changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | | - | |
571 | | - | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
572 | 578 | | |
573 | 579 | | |
574 | 580 | | |
575 | 581 | | |
576 | | - | |
577 | | - | |
578 | 582 | | |
579 | 583 | | |
580 | 584 | | |
| |||
583 | 587 | | |
584 | 588 | | |
585 | 589 | | |
586 | | - | |
587 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
588 | 596 | | |
589 | 597 | | |
590 | 598 | | |
| |||
0 commit comments