[Mlir-commits] [mlir] 8046ab0 - [NFC] Fix syntax of ranked memrefs in the MLIR Language Reference.

Rahul Joshi llvmlistbot at llvm.org
Fri Sep 25 08:18:02 PDT 2020


Author: Rahul Joshi
Date: 2020-09-25T08:17:39-07:00
New Revision: 8046ab04a75bcd3a455faafa1364c67726748a78

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

LOG: [NFC] Fix syntax of ranked memrefs in the MLIR Language Reference.

- Eliminate incorrect |
- Eliminate memspace0 as the memory spaces currently are integer literals and memory
  space 0 is not explicitly printed.

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

Added: 
    

Modified: 
    mlir/docs/LangRef.md

Removed: 
    


################################################################################
diff  --git a/mlir/docs/LangRef.md b/mlir/docs/LangRef.md
index eb0530d82546..6befc79a42a7 100644
--- a/mlir/docs/LangRef.md
+++ b/mlir/docs/LangRef.md
@@ -929,8 +929,7 @@ Syntax:
 memref-type ::= ranked-memref-type | unranked-memref-type
 
 ranked-memref-type ::= `memref` `<` dimension-list-ranked tensor-memref-element-type
-                      (`,` layout-specification)? |
-                      (`,` memory-space)? `>`
+                      (`,` layout-specification)? (`,` memory-space)? `>`
 
 unranked-memref-type ::= `memref` `<*x` tensor-memref-element-type
                          (`,` memory-space)? `>`
@@ -1039,7 +1038,7 @@ Examples of memref static type
 //
 //   { (i, j) : 0 <= i < 16, 0 <= j < 32 }
 //
-memref<16x32xf32, #identity, memspace0>
+memref<16x32xf32, #identity>
 
 // The dimension list "16x4x?" defines the following 3D index space:
 //
@@ -1049,7 +1048,7 @@ memref<16x32xf32, #identity, memspace0>
 // the third dimension.
 //
 // %N here binds to the size of the third dimension.
-%A = alloc(%N) : memref<16x4x?xf32, #col_major, memspace0>
+%A = alloc(%N) : memref<16x4x?xf32, #col_major>
 
 // A 2-d dynamic shaped memref that also has a dynamically sized tiled layout.
 // The memref index space is of size %M x %N, while %B1 and %B2 bind to the
@@ -1088,10 +1087,10 @@ Examples
 ```mlir
 // Allocates a memref with 2D index space:
 //   { (i, j) : 0 <= i < 16, 0 <= j < 32 }
-%A = alloc() : memref<16x32xf32, #imapA, memspace0>
+%A = alloc() : memref<16x32xf32, #imapA>
 
 // Loads data from memref '%A' using a 2D index: (%i, %j)
-%v = load %A[%i, %j] : memref<16x32xf32, #imapA, memspace0>
+%v = load %A[%i, %j] : memref<16x32xf32, #imapA>
 ```
 
 ##### Index Map


        


More information about the Mlir-commits mailing list