Introduce tensor.insert op to Tensor dialect.
authorHanhan Wang <hanchung@google.com>
Sun, 13 Jun 2021 20:45:33 +0000 (13:45 -0700)
committerHanhan Wang <hanchung@google.com>
Sun, 13 Jun 2021 20:45:40 +0000 (13:45 -0700)
commitb4baccc2a760ea13901f201e6ca326284254d205
treecc9e0b86fb701b1e7492cc322e1b0ecae9a5e588
parent899fdf548eee427fe08e462955e6f817ca949730
Introduce tensor.insert op to Tensor dialect.

Add `tensor.insert` op to make `tensor.extract`/`tensor.insert` work in pairs
for `scalar` domain. Like `subtensor`/`subtensor_insert` work in pairs in
`tensor` domain, and `vector.transfer_read`/`vector.transfer_write` work in
pairs in `vector` domain.

Reviewed By: silvas

Differential Revision: https://reviews.llvm.org/D104139
mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
mlir/test/Dialect/Tensor/canonicalize.mlir
mlir/test/Dialect/Tensor/invalid.mlir
mlir/test/Dialect/Tensor/ops.mlir