Commit d7460da
authored
[mlir][utils] Update generate-test-checks.py (#136721)
Following #128083, all `CHECK-SAME` lines generated by
generate-test-checks.py use a strict regex:
```mlir
// CHECK-SAME: %[[VAL_0:[0-9]+|[a-zA-Z$._-][a-zA-Z0-9$._-]*]]: memref<128x256x512xf32>,
```
However, in most cases this strict form is unnecessary and can obscure
readability. In such cases, the following would be sufficient:
```mlir
// CHECK-SAME: %[[VAL_0:.*]]: memref<128x256x512xf32>,
```
This patch adds a command-line flag to make the strict mode optional. To
enable strict regex matching, use:
```bash
generate-test-checks.py --strict_name_re=true file.mlir
```1 parent dee96a3 commit d7460da
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
298 | 305 | | |
299 | 306 | | |
300 | 307 | | |
| |||
406 | 413 | | |
407 | 414 | | |
408 | 415 | | |
409 | | - | |
| 416 | + | |
410 | 417 | | |
411 | 418 | | |
412 | 419 | | |
| |||
0 commit comments