[Mlir-commits] [mlir] cde2dc2 - [mlir] Fix linalg.generic matmul example in the doc

Alex Zinenko llvmlistbot at llvm.org
Mon Jun 22 04:24:48 PDT 2020


Author: Jakub Lichman
Date: 2020-06-22T13:24:41+02:00
New Revision: cde2dc2fa6ca9f34a550acebac7eb81d46e62a60

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

LOG: [mlir] Fix linalg.generic matmul example in the doc

Example of Matmul implementation in linalg.generic operation contained few mistakes that can puzzle new startes when trying to run the example.

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

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
index 85fdd1e3f34e..067d7c2e334b 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
@@ -562,10 +562,10 @@ def GenericOp : GenericOpBase<"generic"> {
     And can be reused in multiple places as:
       ```mlir
       linalg.generic #matmul_trait %A, %B, %C [other-attributes] {
-        (%a: f32, %b: f32, %c: f32) :
+        ^bb0(%a: f32, %b: f32, %c: f32) :
           %d = mulf %a, %b: f32
           %e = addf %c, %d: f32
-          linalg_yield %e : f32
+          linalg.yield %e : f32
       } : memref<?x?xf32, stride_specification>,
           memref<?x?xf32, stride_specification>,
           memref<?x?xf32, stride_specification>


        


More information about the Mlir-commits mailing list