Commit b87f1b2
authored
[MLIR] Add
This commit:
- Introduces a new `InParallelOpInterface`, along with the
`ParallelCombiningOpInterface`, represent the parallel updating
operations we have in a parallel loop of `scf.forall`.
- Change the name of `ParallelCombiningOpInterface` to
`InParallelOpInterface` as the naming was quite confusing.
- `ParallelCombiningOpInterface` now is used to generalize operations
that insert into shared tensors within parallel combining regions.
Previously, only `tensor.parallel_insert_slice` was supported directly
in `scf.InParallelOp` regions.
- `tensor.parallel_insert_slice` now implements
`ParallelCombiningOpInterface`.
This change enables future extensions to support additional parallel
combining operations beyond `tensor.parallel_insert_slice`, which have
different update semantics, so the `in_parallel` region can correctly
and safely represent these kinds of operation without potential mistakes
such as races.
Author credits: @qedawkinsInParallelOpInterface for parallel combining operations (llvm#157736)1 parent f645d20 commit b87f1b2
File tree
16 files changed
+280
-69
lines changed- mlir
- include/mlir
- Dialect
- SCF/IR
- Tensor/IR
- Interfaces
- lib
- Dialect
- Linalg/TransformOps
- SCF
- IR
- Transforms
- Tensor
- IR
- Transforms
- Interfaces
- test/Dialect
- Linalg
- SCF
- utils/bazel/llvm-project-overlay/mlir
16 files changed
+280
-69
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
657 | | - | |
| 657 | + | |
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | | - | |
683 | | - | |
684 | 682 | | |
685 | 683 | | |
686 | 684 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1470 | 1470 | | |
1471 | 1471 | | |
1472 | 1472 | | |
1473 | | - | |
1474 | 1473 | | |
1475 | 1474 | | |
1476 | 1475 | | |
| 1476 | + | |
| 1477 | + | |
1477 | 1478 | | |
1478 | | - | |
| 1479 | + | |
1479 | 1480 | | |
1480 | 1481 | | |
1481 | 1482 | | |
1482 | | - | |
| 1483 | + | |
1483 | 1484 | | |
1484 | 1485 | | |
1485 | 1486 | | |
1486 | | - | |
| 1487 | + | |
1487 | 1488 | | |
1488 | 1489 | | |
1489 | 1490 | | |
1490 | | - | |
| 1491 | + | |
1491 | 1492 | | |
1492 | 1493 | | |
1493 | 1494 | | |
| |||
1569 | 1570 | | |
1570 | 1571 | | |
1571 | 1572 | | |
1572 | | - | |
1573 | | - | |
| 1573 | + | |
| 1574 | + | |
1574 | 1575 | | |
1575 | 1576 | | |
1576 | 1577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Lines changed: 57 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
56 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
57 | 110 | | |
58 | 111 | | |
59 | 112 | | |
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
4147 | 4148 | | |
4148 | 4149 | | |
4149 | 4150 | | |
4150 | | - | |
4151 | | - | |
4152 | | - | |
4153 | | - | |
4154 | | - | |
4155 | | - | |
| 4151 | + | |
| 4152 | + | |
| 4153 | + | |
| 4154 | + | |
| 4155 | + | |
4156 | 4156 | | |
4157 | 4157 | | |
4158 | 4158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
681 | 682 | | |
682 | 683 | | |
683 | 684 | | |
684 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
685 | 688 | | |
686 | 689 | | |
687 | 690 | | |
| |||
1439 | 1442 | | |
1440 | 1443 | | |
1441 | 1444 | | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
1448 | 1448 | | |
1449 | 1449 | | |
1450 | 1450 | | |
| |||
1911 | 1911 | | |
1912 | 1912 | | |
1913 | 1913 | | |
1914 | | - | |
1915 | | - | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
1916 | 1918 | | |
1917 | 1919 | | |
1918 | 1920 | | |
| |||
1971 | 1973 | | |
1972 | 1974 | | |
1973 | 1975 | | |
1974 | | - | |
1975 | 1976 | | |
1976 | | - | |
1977 | | - | |
1978 | | - | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
1979 | 1981 | | |
1980 | 1982 | | |
1981 | 1983 | | |
1982 | | - | |
| 1984 | + | |
1983 | 1985 | | |
1984 | | - | |
1985 | | - | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
1986 | 1990 | | |
| 1991 | + | |
1987 | 1992 | | |
1988 | 1993 | | |
1989 | 1994 | | |
| |||
2018 | 2023 | | |
2019 | 2024 | | |
2020 | 2025 | | |
2021 | | - | |
2022 | | - | |
2023 | | - | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
2027 | 2037 | | |
2028 | 2038 | | |
2029 | 2039 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2976 | 2976 | | |
2977 | 2977 | | |
2978 | 2978 | | |
2979 | | - | |
| 2979 | + | |
2980 | 2980 | | |
2981 | | - | |
| 2981 | + | |
2982 | 2982 | | |
2983 | 2983 | | |
2984 | 2984 | | |
| |||
3153 | 3153 | | |
3154 | 3154 | | |
3155 | 3155 | | |
3156 | | - | |
| 3156 | + | |
3157 | 3157 | | |
3158 | | - | |
| 3158 | + | |
3159 | 3159 | | |
3160 | 3160 | | |
3161 | 3161 | | |
| |||
3846 | 3846 | | |
3847 | 3847 | | |
3848 | 3848 | | |
3849 | | - | |
3850 | | - | |
| 3849 | + | |
3851 | 3850 | | |
3852 | 3851 | | |
3853 | 3852 | | |
| |||
3901 | 3900 | | |
3902 | 3901 | | |
3903 | 3902 | | |
3904 | | - | |
3905 | | - | |
| 3903 | + | |
| 3904 | + | |
3906 | 3905 | | |
3907 | 3906 | | |
3908 | 3907 | | |
| |||
3935 | 3934 | | |
3936 | 3935 | | |
3937 | 3936 | | |
| 3937 | + | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
3938 | 3950 | | |
3939 | 3951 | | |
3940 | 3952 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
973 | | - | |
| 973 | + | |
974 | 974 | | |
975 | 975 | | |
976 | | - | |
| 976 | + | |
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
| |||
0 commit comments