Commit fd8f69d
authored
[mlir][Bufferization] Fix to_buffer(tensor.cast) folder (llvm#150511)
Previously this folder would ignore the layout and memory space on the
to_buffer op and set it as default. This changes the pattern to retain
both fields from the existing memref type but incorporate the static
shape information from the tensor cast.
The `read_only` attribute was also dropped by the pattern and is
retained now as well.1 parent 5f1c89a commit fd8f69d
File tree
2 files changed
+28
-4
lines changed- mlir
- lib/Dialect/Bufferization/IR
- test/Dialect/Bufferization
2 files changed
+28
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
808 | 813 | | |
809 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
810 | 817 | | |
811 | | - | |
| 818 | + | |
| 819 | + | |
812 | 820 | | |
813 | 821 | | |
814 | 822 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
268 | 284 | | |
269 | 285 | | |
270 | 286 | | |
| |||
0 commit comments