Commit 06aecdb
authored
[MLIR][SCF] Verify number of regions in scf.reduce (#171450)
This patch adds `ReduceOp::verifyRegions` to ensure that the number of
reduction regions equals the number of operands (`getReductions().size()
== getOperands().size()`).
Additionally, `ParallelOp::verify` is updated to gracefully handle cases
where the number of reduce operands differs from the initial values,
preventing verification logic crashes and relying on `ReduceOp` to
report structural inconsistencies.
Fixes: #1187681 parent 9b6b52b commit 06aecdb
2 files changed
+39
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3152 | 3152 | | |
3153 | 3153 | | |
3154 | 3154 | | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
3155 | 3158 | | |
3156 | 3159 | | |
3157 | 3160 | | |
| |||
3454 | 3457 | | |
3455 | 3458 | | |
3456 | 3459 | | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
3457 | 3465 | | |
3458 | 3466 | | |
3459 | 3467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
277 | 308 | | |
278 | 309 | | |
279 | 310 | | |
| |||
0 commit comments