Commit c5182c1
authored
[MLIR][Interfaces] Allow non-builtin scalar types in IndexingMapOpInterface (#188774)
The scalar type check in `IndexingMapOpInterface::verifyImpl` and its
helper `verifyIndexingMapOperandType` used `isIntOrIndexOrFloat() ||
isa<ComplexType>()`, which only accepted builtin scalar types. This
rejected valid custom-dialect scalar types such as pointer types
(`\!ptr.ptr<...>`) or other non-shaped dialect types.
The `isScalar` method in `DestinationStyleOpInterface` already treats
any non-MemRef/non-Tensor type as scalar. Align `IndexingMapOpInterface`
with this definition by treating any non-ShapedType as a rank-0 scalar,
regardless of whether it is a builtin type.
Fixes #183606
Assisted-by: Claude Code1 parent 331c1c0 commit c5182c1
File tree
2 files changed
+16
-4
lines changed- mlir
- lib/Interfaces
- test/Dialect/Linalg
2 files changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments