Commit 7b7ff69
authored
[Flang] Support generic execution of parallel regions (#414)
This set of patches removes the early tagging of Generic-SPMD target
regions from MLIR to instead only tell apart Generic from SPMD. This
matches the behavior of Clang, which then relies on the OpenMPOpt pass
to detect situations where Generic kernels can be executed in SPMD mode,
potentially after certain transformations.
Merging this PR results in split distribute + parallel do kernels
running in Generic mode, which might cause performance regressions in
these cases. This is because the OpenMPOpt pass is currently not
prepared to properly SPMDize Generic kernels containing new DeviceRTL
loop functions that only Flang currently generates.
Generic mode before these changes is broken when parallel regions are
reached. With this, it should be possible to properly execute them.1 parent 4f5eaa1 commit 7b7ff69
File tree
49 files changed
+2832
-942
lines changed- clang/lib/CodeGen
- flang
- include/flang/Optimizer/Support
- lib/Optimizer
- CodeGen
- Passes
- test
- Fir
- Integration/OpenMP
- llvm
- include/llvm
- Frontend/OpenMP
- Transforms/Utils
- lib
- Frontend/OpenMP
- Transforms
- IPO
- Utils
- unittests
- Frontend
- Transforms/Utils
- mlir
- docs
- include/mlir/Dialect/OpenMP
- Transforms
- Utils
- lib
- Dialect/OpenMP
- IR
- Transforms
- Utils
- Target/LLVMIR/Dialect/OpenMP
- test
- Dialect/OpenMP
- Target/LLVMIR
- offload/test/offloading/fortran
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
49 files changed
+2832
-942
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11392 | 11392 | | |
11393 | 11393 | | |
11394 | 11394 | | |
11395 | | - | |
11396 | | - | |
| 11395 | + | |
| 11396 | + | |
11397 | 11397 | | |
11398 | 11398 | | |
11399 | 11399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2238 | 2238 | | |
2239 | 2239 | | |
2240 | 2240 | | |
2241 | | - | |
2242 | | - | |
| 2241 | + | |
| 2242 | + | |
2243 | 2243 | | |
2244 | | - | |
| 2244 | + | |
2245 | 2245 | | |
2246 | 2246 | | |
2247 | 2247 | | |
2248 | 2248 | | |
2249 | 2249 | | |
2250 | 2250 | | |
2251 | 2251 | | |
2252 | | - | |
2253 | | - | |
2254 | | - | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
2255 | 2256 | | |
2256 | 2257 | | |
2257 | 2258 | | |
| |||
4936 | 4937 | | |
4937 | 4938 | | |
4938 | 4939 | | |
4939 | | - | |
4940 | | - | |
4941 | | - | |
4942 | | - | |
| 4940 | + | |
| 4941 | + | |
| 4942 | + | |
| 4943 | + | |
| 4944 | + | |
4943 | 4945 | | |
4944 | 4946 | | |
4945 | 4947 | | |
4946 | 4948 | | |
4947 | 4949 | | |
4948 | | - | |
4949 | | - | |
4950 | | - | |
4951 | | - | |
4952 | | - | |
4953 | | - | |
| 4950 | + | |
| 4951 | + | |
| 4952 | + | |
| 4953 | + | |
| 4954 | + | |
| 4955 | + | |
| 4956 | + | |
4954 | 4957 | | |
4955 | 4958 | | |
4956 | 4959 | | |
| |||
5004 | 5007 | | |
5005 | 5008 | | |
5006 | 5009 | | |
5007 | | - | |
5008 | | - | |
| 5010 | + | |
| 5011 | + | |
| 5012 | + | |
5009 | 5013 | | |
5010 | | - | |
| 5014 | + | |
5011 | 5015 | | |
5012 | 5016 | | |
5013 | 5017 | | |
| |||
5089 | 5093 | | |
5090 | 5094 | | |
5091 | 5095 | | |
5092 | | - | |
5093 | | - | |
| 5096 | + | |
| 5097 | + | |
| 5098 | + | |
5094 | 5099 | | |
5095 | | - | |
| 5100 | + | |
5096 | 5101 | | |
5097 | 5102 | | |
5098 | 5103 | | |
| |||
5139 | 5144 | | |
5140 | 5145 | | |
5141 | 5146 | | |
5142 | | - | |
5143 | | - | |
| 5147 | + | |
| 5148 | + | |
| 5149 | + | |
5144 | 5150 | | |
5145 | | - | |
| 5151 | + | |
5146 | 5152 | | |
5147 | 5153 | | |
5148 | 5154 | | |
| |||
5182 | 5188 | | |
5183 | 5189 | | |
5184 | 5190 | | |
5185 | | - | |
5186 | | - | |
| 5191 | + | |
| 5192 | + | |
| 5193 | + | |
5187 | 5194 | | |
5188 | | - | |
| 5195 | + | |
5189 | 5196 | | |
5190 | 5197 | | |
5191 | 5198 | | |
| |||
6152 | 6159 | | |
6153 | 6160 | | |
6154 | 6161 | | |
6155 | | - | |
6156 | | - | |
| 6162 | + | |
| 6163 | + | |
6157 | 6164 | | |
6158 | 6165 | | |
6159 | 6166 | | |
| |||
6162 | 6169 | | |
6163 | 6170 | | |
6164 | 6171 | | |
6165 | | - | |
| 6172 | + | |
| 6173 | + | |
6166 | 6174 | | |
6167 | 6175 | | |
6168 | 6176 | | |
| |||
6879 | 6887 | | |
6880 | 6888 | | |
6881 | 6889 | | |
6882 | | - | |
6883 | | - | |
| 6890 | + | |
| 6891 | + | |
| 6892 | + | |
6884 | 6893 | | |
6885 | 6894 | | |
6886 | 6895 | | |
| |||
6898 | 6907 | | |
6899 | 6908 | | |
6900 | 6909 | | |
6901 | | - | |
| 6910 | + | |
6902 | 6911 | | |
6903 | 6912 | | |
6904 | 6913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
| 248 | + | |
250 | 249 | | |
251 | 250 | | |
252 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
411 | 415 | | |
412 | 416 | | |
413 | 417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
164 | 166 | | |
165 | 167 | | |
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 20 | + | |
| 21 | + | |
24 | 22 | | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
| |||
0 commit comments