[Mlir-commits] [mlir] [mlir] Change `tensor.extract/insert` to take static/dynamic indices. (PR #104488)
Matthias Springer
llvmlistbot at llvm.org
Fri Aug 16 00:10:16 PDT 2024
================
@@ -808,16 +833,35 @@ def Tensor_InsertOp : Tensor_Op<"insert", [
let arguments = (ins AnyType:$scalar,
AnyRankedTensor:$dest,
- Variadic<Index>:$indices);
+ Variadic<Index>:$indices,
+ DenseI64ArrayAttr:$static_indices
+ );
let results = (outs AnyRankedTensor:$result);
let assemblyFormat = [{
- $scalar `into` $dest `[` $indices `]` attr-dict `:` type($dest)
+ $scalar `into`
+ $dest `` custom<DynamicIndexList>($indices, $static_indices)
+ attr-dict `:` type($dest)
}];
let extraClassDeclaration = [{
MutableOperandRange getDpsInitsMutable() { return getDestMutable(); }
----------------
matthias-springer wrote:
Both ops should have a `getMixedIndices` function, same as `getMixedOffsets` etc. of `InsertSliceOp`/`ExtractSliceOp`.
https://github.com/llvm/llvm-project/pull/104488
More information about the Mlir-commits
mailing list