This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Tensor] Update ParallelInsertSlicOp semantics to match that of InsertSliceOp
ClosedPublic

Authored by nicolasvasilache on Jul 1 2022, 5:23 AM.

Details

Summary

This revision updates the op semantics to also allow rank-reducing behavior as well
as updates the implementation to reuse code between the sequential and the parallel
version of the op.

Depends on D128920

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 1 2022, 5:23 AM
nicolasvasilache requested review of this revision.Jul 1 2022, 5:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 1 2022, 5:23 AM
springerm accepted this revision.Jul 1 2022, 5:32 AM
springerm added inline comments.
mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
1117–1118

To be precise: "After buffer allocation, an extract_slice + parallel_insert_slice pair is expected to lower to a memref.subview op if all tensor OpOperands are in-place."

(The memref.subview lowers to the subview, the parallel_insert_slice lowers to a no-op.)

mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
2297–2298

Can this also be templatized and shared between InsertSliceOp and ParallelInsertSliceOp?

This revision is now accepted and ready to land.Jul 1 2022, 5:32 AM
This revision was landed with ongoing or failed builds.Jul 4 2022, 2:37 AM
This revision was automatically updated to reflect the committed changes.