[Mlir-commits] [mlir] [mlir][bufferization] Generalize tensor slice rules to subset ops (PR #65619)

Matthias Springer llvmlistbot at llvm.org
Wed Sep 13 01:13:15 PDT 2023


================
@@ -1172,6 +1107,11 @@ void mlir::tensor::registerBufferizableOpInterfaceExternalModels(
     ReshapeOp::attachInterface<ReshapeOpInterface>(*ctx);
     SplatOp::attachInterface<SplatOpInterface>(*ctx);
 
+    // SubsetOpInterface models.
+    InsertSliceOp::attachInterface<InsertSliceOpSubsetOpInterface>(*ctx);
+    ParallelInsertSliceOp::attachInterface<
+        ParallelInsertSliceOpSubsetOpInterface>(*ctx);
+
----------------
matthias-springer wrote:

It is only used in bufferization at the moment and I wanted to make sure that this change is NFC for users for the moment. I.e., they don't have to add an additional `registerSubsetOpInterfaceExternalModels` call, but registering the `BufferizableOpInterface` models is enough. If we use this interface for other transforms (tiling, etc.) in the future, I'm going to move it to a separate file.


https://github.com/llvm/llvm-project/pull/65619


More information about the Mlir-commits mailing list