diff --git a/mlir/docs/Dialects/Linalg.md b/mlir/docs/Dialects/Linalg.md --- a/mlir/docs/Dialects/Linalg.md +++ b/mlir/docs/Dialects/Linalg.md @@ -130,9 +130,9 @@ (i, j) -> (j) } #attrs = {args_in: 1, args_out: 1, indexings: indexing_maps} -func @example(%A: memref, +func @example(%A: memref<8x?xf32, layout1>, %B: memref>) { - linalg.generic #attrs (%A, %B): memref, + linalg.generic #attrs (%A, %B): memref<8x?xf32, layout1>, memref> return } @@ -142,21 +142,21 @@ materialized by a lowering into a form that will resemble: ``` #attrs = {args_in: 1, args_out: 1, indexings: indexing_maps} -func @example(%A: memref, +func @example(%A: memref<8x?xf32, layout1>, %B: memref>) { // loop bounds determined from data sizes by “inverting the map” - %J = "dim" %2, 0: index - %I = "dim" %2, 1: index - %J2 = "dim" %3, 0: index + %J = "dim" %A, 0: index + %I = "dim" %A, 1: index + %J2 = "dim" %B, 0: index // iteration space is consistent with data + mapping inference %eq = "eq" %J, %J2: i1 "assert" %eq: (i1) -> () for %i = 0 to %I { // loop order is fully defined by indexing maps for %j = 0 to %J { // arbitrary permutations are possible - %a = "load" %2, %j, %i: memref<8x?xf32> - %b = "load" %3, %j: memref> + %a = "load" %A, %j, %i: memref<8x?xf32> + %b = "load" %B, %j: memref> %c = "some_compute"(%a, %b): (f32, vector<4xf32>) -> (vector<4xf32>) - "store" %c, %3, %j: memref> + "store" %c, %B, %j: memref> } } return