Commit 6f58c16
[mlir][linalg] Use ub.poison in data layout propagation if a packed operand requires padding. (#159467)
In the past, it was hard to set padding values because we did not have
ub.poison. It is not always correct if we set zeros as padding values.
Now we can use `ub.poison` in this case. The revision adds the support
for setting padding value using `ub.poison` when padding is required in
the propagation. Otherwise, it creates an invalid pack op.
Additionally the revision adds a control option for allowing padding in
the pattern which is false by default. To correctly do this, a new
`requirePaddingValueStrict` method is added which assumes dynamic dims
would mean padding is required.
The revision also removes trailing white space in the lit test file.
Co-authored-by : Nirvedh Meshram <[email protected]>
---------
Signed-off-by: hanhanW <[email protected]>
Signed-off-by: Nirvedh Meshram <[email protected]>
Co-authored-by: Nirvedh Meshram <[email protected]>1 parent 876296e commit 6f58c16
File tree
6 files changed
+231
-78
lines changed- mlir
- include/mlir/Dialect/Linalg
- IR
- Transforms
- lib/Dialect/Linalg
- IR
- Transforms
- test
- Dialect/Linalg
- lib/Dialect/Linalg
6 files changed
+231
-78
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
242 | 250 | | |
243 | 251 | | |
244 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1914 | 1914 | | |
1915 | 1915 | | |
1916 | 1916 | | |
| 1917 | + | |
| 1918 | + | |
1917 | 1919 | | |
1918 | 1920 | | |
1919 | | - | |
| 1921 | + | |
| 1922 | + | |
1920 | 1923 | | |
1921 | 1924 | | |
1922 | 1925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5310 | 5310 | | |
5311 | 5311 | | |
5312 | 5312 | | |
| 5313 | + | |
| 5314 | + | |
| 5315 | + | |
| 5316 | + | |
| 5317 | + | |
| 5318 | + | |
| 5319 | + | |
| 5320 | + | |
| 5321 | + | |
| 5322 | + | |
| 5323 | + | |
| 5324 | + | |
| 5325 | + | |
| 5326 | + | |
| 5327 | + | |
| 5328 | + | |
| 5329 | + | |
| 5330 | + | |
| 5331 | + | |
| 5332 | + | |
| 5333 | + | |
| 5334 | + | |
| 5335 | + | |
| 5336 | + | |
| 5337 | + | |
| 5338 | + | |
5313 | 5339 | | |
5314 | 5340 | | |
5315 | 5341 | | |
| |||
0 commit comments