[Mlir-commits] [mlir] [mlir] Declare promised interfaces for all dialects [2/3] (PR #78368)

Aart Bik llvmlistbot at llvm.org
Wed Jan 31 09:53:06 PST 2024


================
@@ -1780,6 +1781,26 @@ void SparseTensorDialect::initialize() {
 #define GET_OP_LIST
 #include "mlir/Dialect/SparseTensor/IR/SparseTensorOps.cpp.inc"
       >();
+  declarePromisedInterface<ConcatenateOp,
+                           bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<ConvertOp, bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<LoadOp, bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<NewOp, bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<InsertOp, bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<NumberOfEntriesOp,
+                           bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<AssembleOp,
+                           bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<DisassembleOp,
+                           bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<ToCoordinatesBufferOp,
+                           bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<ToCoordinatesOp,
+                           bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<ToPositionsOp,
+                           bufferization::BufferizableOpInterface>();
+  declarePromisedInterface<ToValuesOp,
+                           bufferization::BufferizableOpInterface>();
----------------
aartbik wrote:

I am fine with the change for sparse, so lgtm, but can you give me some background on how this improves things? At a glance, it just looks like adding boilerplate for something that was already working (with the "crash" if not declared change only).

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


More information about the Mlir-commits mailing list