[Mlir-commits] [mlir] [mlir][bufferization] Generalize tensor slice rules to subset ops (PR #65619)
    Martin Erhart 
    llvmlistbot at llvm.org
       
    Wed Sep 13 01:39:59 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);
+
----------------
maerhart wrote:
I see, what about moving the interface implementation into a separate `SubsetInsertionOpInterfaceImpl.cpp` already, exposing a dedicated registration function in the public API, but then calling that in the bufferizableOpInteface registration function?
It just feels a bit inconsistent to me to put the concrete implementation in the same file but have a separate td and header file for the interface declaration.
https://github.com/llvm/llvm-project/pull/65619
    
    
More information about the Mlir-commits
mailing list