Commit b67ae6a
committed
[mlir][vector] Missing indices on vectorization of 1-d reduction to 1-ranked memref
Vectorization of a 1-d reduction where the output variable is a 1-ranked memref
can generate an invalid `vector.transfer_write` with no indices for the memref, e.g.:
vector.transfer_write"(%vec, %buff) <{...}> : (vector<f32>, memref<1xf32>) -> ()
This patch solves the problem by providing the expected amount of indices (i.e.
matching the rank of the memref).1 parent 21aa788 commit b67ae6a
File tree
2 files changed
+47
-4
lines changed- mlir
- lib/Dialect/Linalg/Transforms
- test/Dialect/Linalg/vectorization
2 files changed
+47
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
749 | 752 | | |
750 | 753 | | |
751 | 754 | | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
765 | | - | |
| 765 | + | |
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1523 | 1523 | | |
1524 | 1524 | | |
1525 | 1525 | | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
1526 | 1569 | | |
1527 | 1570 | | |
1528 | 1571 | | |
| |||
0 commit comments