Commit 4d0ea08
authored
[Global Opt] Raise tensor.extract to input (iree-org#22434)
The PR that added `raiseTensorExtractToInput`
(iree-org#14718) only used the
`linalg.generic` as an intermediate step when trying to convert to a
`tensor` view-like op. However, we should be replace the generic op with
the `tensor.extract`-less generic op when it can't be converted to a
view-like op.
For example, the linalg op in the test case `test_extract_to_transpose`
cannot be converted into a view but should be converted to a simple
transpose.
Signed-off-by: Ian Wood <[email protected]>1 parent 6c6d175 commit 4d0ea08
File tree
2 files changed
+28
-8
lines changed- compiler/src/iree/compiler/GlobalOptimization
- test
2 files changed
+28
-8
lines changedLines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1016 | 1016 | | |
1017 | 1017 | | |
1018 | 1018 | | |
1019 | | - | |
1020 | | - | |
| 1019 | + | |
| 1020 | + | |
1021 | 1021 | | |
| 1022 | + | |
| 1023 | + | |
1022 | 1024 | | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
| 1025 | + | |
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
| 1029 | + | |
1029 | 1030 | | |
1030 | 1031 | | |
1031 | 1032 | | |
1032 | 1033 | | |
1033 | 1034 | | |
1034 | | - | |
1035 | 1035 | | |
1036 | 1036 | | |
1037 | 1037 | | |
1038 | | - | |
| 1038 | + | |
1039 | 1039 | | |
1040 | | - | |
| 1040 | + | |
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
296 | 316 | | |
297 | 317 | | |
298 | 318 | | |
| |||
0 commit comments