[all-commits] [llvm/llvm-project] 025966: [mlir] Add a postprocessing parameter in Pattern

Jian Cai via All-commits all-commits at lists.llvm.org
Tue Aug 15 14:08:48 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 02596693fac55f550e85620f5184547c80c8f930
      https://github.com/llvm/llvm-project/commit/02596693fac55f550e85620f5184547c80c8f930
  Author: Jian Cai <caij2003 at gmail.com>
  Date:   2023-08-15 (Tue, 15 Aug 2023)

  Changed paths:
    M mlir/docs/DeclarativeRewrites.md
    M mlir/include/mlir/IR/PatternBase.td
    M mlir/include/mlir/TableGen/Pattern.h
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  [mlir] Add a postprocessing parameter in Pattern

This adds a parameter SupplementalPatterns in tablegen class Pattern for
postprocessing code. For example, this can be used to ensure ops are
placed in the correct device by copying the atttributes that decide
devicement placement in Tensorflow dialect to prevent performance
regression.

Reviewed By: jpienaar

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




More information about the All-commits mailing list