From abcf5ff0cc6813764cf9a18789bdef96f369eb3c Mon Sep 17 00:00:00 2001 From: Jacques Pienaar Date: Wed, 18 Dec 2019 08:58:37 -0800 Subject: [PATCH] Fix line break in LangRef This was munging up the example with the text. PiperOrigin-RevId: 286201762 --- mlir/g3doc/LangRef.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mlir/g3doc/LangRef.md b/mlir/g3doc/LangRef.md index cd6d331..da60b8b 100644 --- a/mlir/g3doc/LangRef.md +++ b/mlir/g3doc/LangRef.md @@ -760,7 +760,6 @@ TODO: Need to decide on a representation for quantized integers Syntax: ``` - memref-type ::= ranked-memref-type | unranked-memref-type ranked-memref-type ::= `memref` `<` dimension-list-ranked tensor-memref-element-type @@ -811,20 +810,23 @@ exposed to codegen but one may query the rank of an unranked memref (a special op will be needed for this purpose) and perform a switch and cast to a ranked memref as a prerequisite to codegen. -Example ```mlir // With static ranks, we need a function for each // possible -argument type %A = alloc() : memref<16x32xf32> %B = alloc() : +Example: + +```mlir +// With static ranks, we need a function for each possible argument type +%A = alloc() : memref<16x32xf32> %B = alloc() : memref<16x32x64xf32> call @helper_2D(%A) : (memref<16x32xf32>)->() call @helper_3D(%B) : (memref<16x32x64xf32>)->() -// With unknown rank, the functions can be unified under one unranked type +// With unknown rank, the functions can be unified under one unranked type %A = alloc() : memref<16x32xf32> %B = alloc() : memref<16x32x64xf32> // Remove rank info %A_u = memref_cast %A : memref<16x32xf32> -> memref<*xf32> %B_u = memref_cast %B : memref<16x32x64xf32> -> memref<*xf32> -// call same function with dynamic ranks +// call same function with dynamic ranks call @helper(%A_u) : (memref<*xf32>)->() -call @helper(%B_u) : (memref<*xf32>)->() +call @helper(%B_u) : (memref<*xf32>)->() ``` The core syntax and representation of a layout specification is a -- 2.7.4