Commit 07590ac
committed
[MLIR] Fix race condition in MLIR verifier
`failableParallelForEach` will non-deterministically early terminate upon failure, leading to inconsistent and potentially missing diagnostics.
This PR uses `parallelForEach` to ensure all operations are verified and all diagnostics are handled, while tracking the failure state separately.
Other potential fixes include:
- Making `failableParallelForEach` have deterministic early-exit behavior (or have an option for it)
- I didn't want to change more than what was required (and potentially incur perf hits for unrelated code), but if this is a better fix I'm happy to submit a patch.
- I think all diagnostics that can be detected from verification failures should be reported, so I don't even think this would be correct behavior anyway
- Adding an option for `failableParallelForEach` to still execute on every element on the range while still returning `LogicalResult`1 parent 747214e commit 07590ac
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
226 | 230 | | |
| 231 | + | |
227 | 232 | | |
228 | 233 | | |
229 | 234 | | |
| |||
0 commit comments