[mlir] Fix linalg.generic matmul example in the doc
authorJakub Lichman <limo@google.com>
Mon, 22 Jun 2020 11:23:39 +0000 (13:23 +0200)
committerAlex Zinenko <zinenko@google.com>
Mon, 22 Jun 2020 11:24:41 +0000 (13:24 +0200)
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

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

index 85fdd1e..067d7c2 100644 (file)
@@ -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>