You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[mlir][vector] Allow integer indices in vector.extract/insert ops
`vector.extract` and `vector.insert` can currently take an `i64` constant
or an `index` type value as indices. The `index` type will usually lower to
an `i32` or `i64` type. However, we are often indexing really small vector
dimensions where smaller integers could be used. This PR extends both
ops to accept any integer value as indices. For example:
```
%0 = vector.extract %arg0[%i32_idx : i32] : vector<8x16xf32> from vector<4x8x16xf32>
%1 = vector.extract %arg0[%i8_idx, %i8_idx : i8] : vector<16xf32> from vector<4x8x16xf32>
%2 = vector.extract %arg0[%i8_idx, 5, %i8_idx : i8] : f32 from vector<4x8x16xf32>
```
This led to some changes to the ops' parser and printer. When a value index is provided,
the index type is printed as part of the index list. All the value indices provided must
match that type. When no value index is provided, no index type is printed.
0 commit comments