[Mlir-commits] [mlir] 3ec6b1b - [mlir] Add default implementations for methods in `TilingInterface`.

Nicolas Vasilache llvmlistbot at llvm.org
Mon Dec 6 00:36:02 PST 2021


Author: MaheshRavishankar
Date: 2021-12-06T08:35:55Z
New Revision: 3ec6b1bfacebd65450662c75215a96ae59769368

URL: https://github.com/llvm/llvm-project/commit/3ec6b1bfacebd65450662c75215a96ae59769368
DIFF: https://github.com/llvm/llvm-project/commit/3ec6b1bfacebd65450662c75215a96ae59769368.diff

LOG: [mlir] Add default implementations for methods in `TilingInterface`.

Adding the default implementation of `getLoopIteratorTypes` and
`getLoopBounds` allows ExternalModels to override these methods.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D115101

Added: 
    

Modified: 
    mlir/include/mlir/Interfaces/TilingInterface.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Interfaces/TilingInterface.td b/mlir/include/mlir/Interfaces/TilingInterface.td
index fb1ee6b724dea..d82412b429212 100644
--- a/mlir/include/mlir/Interfaces/TilingInterface.td
+++ b/mlir/include/mlir/Interfaces/TilingInterface.td
@@ -48,7 +48,10 @@ def TilingInterface : OpInterface<"TilingInterface"> {
           from MLIR Structured Op Utils.
         }],
         /*retType=*/"SmallVector<StringRef>",
-        /*methodName=*/"getLoopIteratorTypes"
+        /*methodName=*/"getLoopIteratorTypes",
+        /*args=*/(ins),
+        /*methodBody=*/"",
+        /*defaultImplementation=*/"return {};"
       >,
       InterfaceMethod<
         /*desc=*/[{
@@ -57,7 +60,9 @@ def TilingInterface : OpInterface<"TilingInterface"> {
         }],
         /*retTy=*/"SmallVector<Range>",
         /*methodName=*/"getLoopBounds",
-        /*args=*/(ins "OpBuilder &":$b)
+        /*args=*/(ins "OpBuilder &":$b),
+        /*methodBody=*/"",
+        /*defaultImplementation=*/"return {};"
       >,
       InterfaceMethod<
         /*desc=*/[{


        


More information about the Mlir-commits mailing list