Commit 3353e18
[compiler] Fix stablehlo-ext-constant-folding bug in "absorb tensor.cast" pattern
This PR move the following internal commits to OSS
[compiler] Fix `stablehlo-ext-constant-folding` bug in "absorb
tensor.cast" pattern
Fixes an issue where we incorrectly assume all StableHLO operations have
tensor operands. There are other types which can be used by various ops
--- `stablehlo.token` and `tuple` at least (see
https://openxla.org/stablehlo/spec#types).
GitOrigin-RevId: 5415c7a0db725232fa30086c27ca38e70d28d0eb
Co-authored-by: Copybara Bot <[email protected]>1 parent ff1b5e3 commit 3353e18
File tree
3 files changed
+50
-3
lines changed- mlir-tensorrt
- compiler/lib/Dialect/StableHloExt/Transforms
- tensorrt/lib/Target
- test/Dialect/StableHloExt
3 files changed
+50
-3
lines changedLines changed: 27 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1038 | 1038 | | |
1039 | 1039 | | |
1040 | 1040 | | |
1041 | | - | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
1042 | 1046 | | |
1043 | 1047 | | |
1044 | 1048 | | |
| |||
1273 | 1277 | | |
1274 | 1278 | | |
1275 | 1279 | | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
1276 | 1300 | | |
1277 | | - | |
1278 | | - | |
| 1301 | + | |
| 1302 | + | |
1279 | 1303 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
806 | 809 | | |
807 | 810 | | |
808 | 811 | | |
| |||
811 | 814 | | |
812 | 815 | | |
813 | 816 | | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
814 | 821 | | |
815 | 822 | | |
816 | 823 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
0 commit comments