Commit 1fab32b
Add verifier to
`aten.view` maps to the shape-only overload (`aten::view(Tensor,
SymInt[])`), which preserves dtype. Without a verifier, invalid IR with
mismatched input/output element types reaches `genericViewLikeFold` and
crashes with an assertion failure in `DenseElementsAttr::get`.
Fixes #4479
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>aten.view to reject element type mismatches1 parent 1f2abc8 commit 1fab32b
File tree
4 files changed
+26
-1
lines changed- include/torch-mlir/Dialect/Torch/IR
- lib/Dialect/Torch/IR
- projects/pt1/python/torch_mlir/jit_ir_importer/build_tools
- test/Dialect/Torch
4 files changed
+26
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13128 | 13128 | | |
13129 | 13129 | | |
13130 | 13130 | | |
| 13131 | + | |
13131 | 13132 | | |
13132 | 13133 | | |
13133 | 13134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
1221 | 1236 | | |
1222 | 1237 | | |
1223 | 1238 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
964 | | - | |
| 964 | + | |
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
0 commit comments