Clarify that identity maps are discarded from the MemRef type
authorAlex Zinenko <zinenko@google.com>
Fri, 15 Nov 2019 18:19:26 +0000 (10:19 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Fri, 15 Nov 2019 18:28:58 +0000 (10:28 -0800)
Update LangRef to explicitly mention the type canonicalization rule applied to
MemRef types: identity maps do not contribute to type identification.

PiperOrigin-RevId: 280684904

mlir/g3doc/LangRef.md

index 90abb28..21fa8f8 100644 (file)
@@ -876,6 +876,10 @@ A layout map is a [semi-affine map](Dialects/Affine.md#semi-affine-maps) which
 encodes logical to physical index space mapping, by mapping input dimensions to
 their ordering from most-major (slowest varying) to most-minor (fastest
 varying). Therefore, an identity layout map corresponds to a row-major layout.
+Identity layout maps do not contribute to the MemRef type identification and are
+discarded on construction. That is, a type with an explicit identity map is
+`memref<?x?xf32, (i,j)->(i,j)>` is strictly the same as the one without layout
+maps, `memref<?x?xf32>`.
 
 Layout map examples: