[Mlir-commits] [mlir] 84580a0 - [mlir][irdl] update documentation (#103394)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Aug 31 17:54:12 PDT 2024


Author: Timothy Hoffman
Date: 2024-09-01T01:54:09+01:00
New Revision: 84580a02e0f0d3a43efc73dacd6bf5a18cf628cc

URL: https://github.com/llvm/llvm-project/commit/84580a02e0f0d3a43efc73dacd6bf5a18cf628cc
DIFF: https://github.com/llvm/llvm-project/commit/84580a02e0f0d3a43efc73dacd6bf5a18cf628cc.diff

LOG: [mlir][irdl] update documentation (#103394)

fixes #103300

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
    mlir/include/mlir/Dialect/IRDL/IR/IRDLTypes.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td b/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
index aa327b2fd869fc..c7fcb55120c827 100644
--- a/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
+++ b/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
@@ -472,7 +472,7 @@ def IRDL_BaseOp : IRDL_ConstraintOp<"base",
       }
 
       irdl.type @complex_wrapper {
-        %0 = irdl.base @complex
+        %0 = irdl.base @cmath::@complex
         irdl.parameters(%0)
       }
     }
@@ -588,7 +588,7 @@ def IRDL_AnyOfOp : IRDL_ConstraintOp<"any_of",
 
     The above program defines a type `complex` inside the dialect `cmath` that
     can have a single type parameter that can be either `i32`, `i64`, `f32` or
-    `f32`.
+    `f64`.
   }];
 
   let arguments = (ins Variadic<IRDL_AttributeType>:$args);

diff  --git a/mlir/include/mlir/Dialect/IRDL/IR/IRDLTypes.td b/mlir/include/mlir/Dialect/IRDL/IR/IRDLTypes.td
index 2fcf1b41ffd78f..9b17bf23df1825 100644
--- a/mlir/include/mlir/Dialect/IRDL/IR/IRDLTypes.td
+++ b/mlir/include/mlir/Dialect/IRDL/IR/IRDLTypes.td
@@ -32,13 +32,13 @@ def IRDL_AttributeType : IRDL_Type<"Attribute", "attribute"> {
     Example:
 
     ```mlir
-    irdl.dialect cmath {
+    irdl.dialect @cmath {
 
       irdl.type @complex { /* ... */ }
 
       irdl.operation @norm {
         %0 = irdl.any
-        %1 = irdl.parametric @complex<%0>
+        %1 = irdl.parametric @cmath::@complex<%0>
         irdl.operands(%1)
         irdl.results(%0)
       }


        


More information about the Mlir-commits mailing list