Commit 8962a2a
committed
compiler: Keep the outer Dimension parallel on a short par-tile
When a multi `par-tile` entry is shorter than the blocked nest, the
innermost Dimensions consume the available block sizes and the outermost
one runs into a StopIteration. It was then dropped into `compact`, which
promotes it back to its root Dimension, discarding its BlockDimension.
On a device that is a serialization: the Dimension ends up outside the
blocked nest, `filter_iterations` rejects it as non-parallel, and the
kernel is launched over a 2D grid from a host loop iterating the outer
Dimension one slice at a time.
Pad such an entry with its innermost size instead, so the nest stays
fully blocked. Whether to do so is decided when the par-tile is built,
where the target is already known, rather than by inspecting a cluster
back in the pass. It applies to multi par-tiles on a device only: a
single user-supplied par-tile defines the block rank on purpose, and on
a host a short entry is the documented way to ask for 2.5D blocking.1 parent 33c3b12 commit 8962a2a
4 files changed
Lines changed: 72 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
482 | 487 | | |
483 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
484 | 491 | | |
485 | 492 | | |
486 | 493 | | |
| |||
536 | 543 | | |
537 | 544 | | |
538 | 545 | | |
| 546 | + | |
539 | 547 | | |
540 | 548 | | |
541 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
| 498 | + | |
498 | 499 | | |
499 | 500 | | |
500 | 501 | | |
| |||
522 | 523 | | |
523 | 524 | | |
524 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
525 | 542 | | |
| 543 | + | |
| 544 | + | |
526 | 545 | | |
527 | 546 | | |
528 | 547 | | |
| |||
537 | 556 | | |
538 | 557 | | |
539 | 558 | | |
| 559 | + | |
540 | 560 | | |
541 | 561 | | |
542 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
543 | 567 | | |
544 | 568 | | |
545 | 569 | | |
| |||
622 | 646 | | |
623 | 647 | | |
624 | 648 | | |
625 | | - | |
| 649 | + | |
| 650 | + | |
626 | 651 | | |
627 | 652 | | |
628 | | - | |
| 653 | + | |
629 | 654 | | |
630 | 655 | | |
631 | 656 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
147 | 180 | | |
148 | 181 | | |
149 | 182 | | |
| |||
0 commit comments