[Mlir-commits] [mlir] b46e78c - [mlir][NFC] Cleanup Passes documentation

Alex Zinenko llvmlistbot at llvm.org
Mon Feb 27 07:35:54 PST 2023


Author: Kohei Yamaguchi
Date: 2023-02-27T16:35:47+01:00
New Revision: b46e78c7cb1147d60ca08f780194bedc09afbb1e

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

LOG: [mlir][NFC]  Cleanup Passes documentation

- Fix a place of NVGPU dialect's pass
- Move a summary of `-finalize-memref-to-llvm` into description
- Fix broken links
- Replace back-quote dialect headers with single-quote headers for
  improved readability.

Reviewed By: rriddle

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

Added: 
    

Modified: 
    mlir/docs/Passes.md
    mlir/include/mlir/Conversion/Passes.td
    mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td
    mlir/include/mlir/Transforms/Passes.td

Removed: 
    


################################################################################
diff  --git a/mlir/docs/Passes.md b/mlir/docs/Passes.md
index 9b859f8d4ac73..aa2cddbe079ee 100644
--- a/mlir/docs/Passes.md
+++ b/mlir/docs/Passes.md
@@ -16,39 +16,43 @@ This document describes the available MLIR passes and their contracts.
 
 [include "ConversionPasses.md"]
 
-## `async` Dialect Passes
+## 'async' Dialect Passes
 
 [include "AsyncPasses.md"]
 
-## `affine` Dialect Passes
+## 'affine' Dialect Passes
 
 [include "AffinePasses.md"]
 
-## `arith` Dialect Passes
+## 'arith' Dialect Passes
 
 [include "ArithPasses.md"]
 
-## `func` Dialect Passes
+## 'func' Dialect Passes
 
 [include "FuncPasses.md"]
 
-## `gpu` Dialect Passes
+## 'gpu' Dialect Passes
 
 [include "GPUPasses.md"]
 
-## `linalg` Dialect Passes
+## 'linalg' Dialect Passes
 
 [include "LinalgPasses.md"]
 
-## `llvm` Dialect Passes
+## 'llvm' Dialect Passes
 
 [include "LLVMPasses.md"]
 
-## `memref` Dialect Passes
+## 'memref' Dialect Passes
 
 [include "MemRefPasses.md"]
 
-## `quant` Dialect Passes
+## 'nvgpu' Dialect Passes
+
+[include "NVGPUPasses.md"]
+
+## 'quant' Dialect Passes
 
 [include "QuantPasses.md"]
 
@@ -56,31 +60,31 @@ This document describes the available MLIR passes and their contracts.
 
 [include "ReducerPasses.md"]
 
-## `scf` Dialect Passes
+## 'scf' Dialect Passes
 
 [include "SCFPasses.md"]
 
-## `shape` Dialect Passes
+## 'shape' Dialect Passes
 
 [include "ShapePasses.md"]
 
-## `sparse_tensor` Dialect Passes
+## 'sparse_tensor' Dialect Passes
 
 [include "SparseTensorPasses.md"]
 
-## `spv` Dialect Passes
+## 'spv' Dialect Passes
 
 [include "SPIRVPasses.md"]
 
-## `tensor` Dialect Passes
+## 'tensor' Dialect Passes
 
 [include "TensorPasses.md"]
 
-## `transform` Dialect Passes
+## 'transform' Dialect Passes
 
 [include "TransformPasses.md"]
 
-## `vector` Dialect Passes
+## 'vector' Dialect Passes
 
 [include "VectorPasses.md"]
 

diff  --git a/mlir/include/mlir/Conversion/Passes.td b/mlir/include/mlir/Conversion/Passes.td
index ed7282a824abe..700ed6109ae34 100644
--- a/mlir/include/mlir/Conversion/Passes.td
+++ b/mlir/include/mlir/Conversion/Passes.td
@@ -636,11 +636,14 @@ def ConvertMathToFuncs : Pass<"convert-math-to-funcs", "ModuleOp"> {
 
 def FinalizeMemRefToLLVMConversionPass :
     Pass<"finalize-memref-to-llvm", "ModuleOp"> {
-  let summary = "Finalize the conversion of the operations from the MemRef "
-                "dialect to the LLVM dialect."
-                "This conversion will not convert some complex MemRef "
-                "operations. Make sure to run `expand-strided-metadata` "
-                "beforehand for these.";
+  let summary = "Finalize MemRef dialect to LLVM dialect conversion";
+  let description = [{
+    Finalize the conversion of the operations from the MemRef 
+    dialect to the LLVM dialect.
+    This conversion will not convert some complex MemRef 
+    operations. Make sure to run `expand-strided-metadata` 
+    beforehand for these.
+  }];
   let dependentDialects = ["LLVM::LLVMDialect"];
   let options = [
     Option<"useAlignedAlloc", "use-aligned-alloc", "bool", /*default=*/"false",

diff  --git a/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td b/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td
index c0b08ee34ce2c..f339c7c346742 100644
--- a/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td
@@ -48,18 +48,17 @@ def NormalizeMemRefs : Pass<"normalize-memrefs", "ModuleOp"> {
   let summary = "Normalize memrefs";
    let description = [{
     This pass transforms memref types with a non-trivial
-    [layout map](https://mlir.llvm.org/docs/LangRef/#layout-map) into
-    memref types with an identity layout map, e.g. (i, j) -> (i, j). This
+    [layout map](https://mlir.llvm.org/docs/Dialects/Builtin/#affine-map-layout)
+    into memref types with an identity layout map, e.g. (i, j) -> (i, j). This
     pass is inter-procedural, in the sense that it can modify function
     interfaces and call sites that pass memref types. In order to modify
     memref types while preserving the original behavior, users of those
     memref types are also modified to incorporate the resulting layout map.
-    For instance, an [AffineLoadOp]
-    (https://mlir.llvm.org/docs/Dialects/Affine/#affineload-affineloadop)
+    For instance, an [AffineLoadOp](https://mlir.llvm.org/docs/Dialects/Affine/#affineload-mliraffineloadop)
     will be updated to compose the layout map with with the affine expression
-    contained in the op. Operations marked with the [MemRefsNormalizable]
-    (https://mlir.llvm.org/docs/Traits/#memrefsnormalizable) trait are
-    expected to be normalizable. Supported operations include affine
+    contained in the op. Operations marked with the
+    [MemRefsNormalizable](https://mlir.llvm.org/docs/Traits/#memrefsnormalizable)
+    trait are expected to be normalizable. Supported operations include affine
     operations, memref.alloc, memref.dealloc, and func.return.
 
     Given an appropriate layout map specified in the code, this transformation

diff  --git a/mlir/include/mlir/Transforms/Passes.td b/mlir/include/mlir/Transforms/Passes.td
index e2a15934e3cf2..9f159ba35ff79 100644
--- a/mlir/include/mlir/Transforms/Passes.td
+++ b/mlir/include/mlir/Transforms/Passes.td
@@ -133,7 +133,7 @@ def LocationSnapshot : Pass<"snapshot-op-locations"> {
     ```
 
     * If set, the new location is fused with the original location in the form
-    of a [`Name Location`](Diagnostics.md#name-location) with the specified tag.
+    of a [`Name Location`](Dialects/Builtin.md/#nameloc) with the specified tag.
 
     Example:
 
@@ -187,7 +187,7 @@ def StripDebugInfo : Pass<"strip-debuginfo"> {
   let summary = "Strip debug info from all operations";
   let description = [{
     This pass strips the IR of any location information, by replacing all
-    operation locations with [`unknown`](Diagnostics.md#unknown-location).
+    operation locations with [`unknown`](Dialects/Builtin.md/#unknownloc).
   }];
   let constructor = "mlir::createStripDebugInfoPass()";
 }
@@ -199,7 +199,7 @@ def SymbolDCE : Pass<"symbol-dce"> {
     by computing the set of operations that are known to be live, propagating
     that liveness to other symbols, and then deleting all symbols that are not
     within this live set. Live symbols are those that have a
-    [visibility](SymbolsAndSymbolTables.md#symbol-visibility) that extends
+    [visibility](SymbolsAndSymbolTables.md/#symbol-visibility) that extends
     beyond the IR, e.g. `public`, or those that are referenced by live symbols
     or other non-Symbol operations.
 


        


More information about the Mlir-commits mailing list