Commit ad2a460
committed
[MLIR][OpenMP] Remove Generic-SPMD early detection
This patch removes logic from MLIR to attempt identifying Generic kernels that
could be executed in SPMD mode.
This optimization is done by the OpenMPOpt pass for Clang and is only required
here to circumvent missing support for the new DeviceRTL APIs used in MLIR to
LLVM IR translation that Clang doesn't currently use (e.g.
`kmpc_distribute_static_loop`). Removing checks in MLIR avoids duplicating the
logic that should be centralized in the OpenMPOpt pass.
Additionally, offloading kernels currently compiled through the OpenMP dialect
fail to run parallel regions properly when in Generic mode. By disabling early
detection, this issue becomes apparent for a range of kernels where this was
masked by having them run in SPMD mode.1 parent b92ff6b commit ad2a460
File tree
4 files changed
+23
-63
lines changed- mlir
- include/mlir/Dialect/OpenMP
- lib
- Dialect/OpenMP/IR
- Target/LLVMIR/Dialect/OpenMP
- test/Target/LLVMIR
4 files changed
+23
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
234 | 233 | | |
235 | 234 | | |
236 | 235 | | |
237 | 236 | | |
238 | | - | |
239 | 237 | | |
240 | 238 | | |
241 | 239 | | |
242 | 240 | | |
243 | 241 | | |
244 | | - | |
245 | | - | |
| 242 | + | |
| 243 | + | |
246 | 244 | | |
247 | | - | |
248 | 245 | | |
249 | 246 | | |
250 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2373 | 2373 | | |
2374 | 2374 | | |
2375 | 2375 | | |
2376 | | - | |
| 2376 | + | |
2377 | 2377 | | |
2378 | 2378 | | |
2379 | 2379 | | |
| |||
2386 | 2386 | | |
2387 | 2387 | | |
2388 | 2388 | | |
2389 | | - | |
| 2389 | + | |
2390 | 2390 | | |
2391 | 2391 | | |
2392 | 2392 | | |
2393 | 2393 | | |
2394 | 2394 | | |
2395 | | - | |
| 2395 | + | |
2396 | 2396 | | |
2397 | 2397 | | |
2398 | 2398 | | |
2399 | | - | |
| 2399 | + | |
2400 | 2400 | | |
2401 | 2401 | | |
2402 | 2402 | | |
2403 | | - | |
| 2403 | + | |
2404 | 2404 | | |
2405 | 2405 | | |
2406 | 2406 | | |
2407 | | - | |
| 2407 | + | |
2408 | 2408 | | |
2409 | 2409 | | |
2410 | 2410 | | |
| |||
2418 | 2418 | | |
2419 | 2419 | | |
2420 | 2420 | | |
2421 | | - | |
| 2421 | + | |
2422 | 2422 | | |
2423 | 2423 | | |
2424 | | - | |
| 2424 | + | |
2425 | 2425 | | |
2426 | 2426 | | |
2427 | 2427 | | |
2428 | 2428 | | |
2429 | | - | |
2430 | | - | |
2431 | | - | |
2432 | | - | |
2433 | | - | |
2434 | | - | |
2435 | | - | |
2436 | | - | |
2437 | | - | |
2438 | | - | |
2439 | | - | |
2440 | | - | |
2441 | | - | |
2442 | | - | |
2443 | | - | |
2444 | | - | |
2445 | | - | |
2446 | | - | |
2447 | | - | |
2448 | | - | |
2449 | | - | |
2450 | | - | |
2451 | | - | |
2452 | | - | |
2453 | | - | |
2454 | | - | |
2455 | | - | |
| 2429 | + | |
2456 | 2430 | | |
2457 | 2431 | | |
2458 | 2432 | | |
2459 | 2433 | | |
2460 | 2434 | | |
2461 | | - | |
| 2435 | + | |
2462 | 2436 | | |
2463 | 2437 | | |
2464 | 2438 | | |
2465 | 2439 | | |
2466 | 2440 | | |
2467 | | - | |
| 2441 | + | |
2468 | 2442 | | |
2469 | 2443 | | |
2470 | 2444 | | |
| |||
Lines changed: 6 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2605 | 2605 | | |
2606 | 2606 | | |
2607 | 2607 | | |
2608 | | - | |
2609 | | - | |
2610 | | - | |
| 2608 | + | |
2611 | 2609 | | |
2612 | 2610 | | |
2613 | 2611 | | |
| |||
5438 | 5436 | | |
5439 | 5437 | | |
5440 | 5438 | | |
5441 | | - | |
5442 | | - | |
5443 | | - | |
5444 | | - | |
5445 | 5439 | | |
5446 | | - | |
5447 | | - | |
5448 | | - | |
5449 | | - | |
5450 | | - | |
5451 | | - | |
5452 | | - | |
5453 | | - | |
5454 | | - | |
5455 | | - | |
| 5440 | + | |
| 5441 | + | |
| 5442 | + | |
| 5443 | + | |
| 5444 | + | |
5456 | 5445 | | |
5457 | 5446 | | |
5458 | 5447 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
0 commit comments