[all-commits] [llvm/llvm-project] d064c4: [mlir] Introduce Transform dialect
ftynse via All-commits
all-commits at lists.llvm.org
Thu Apr 14 04:49:00 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d064c4801c927ad5a706b66eaee4814fcc5ea45e
https://github.com/llvm/llvm-project/commit/d064c4801c927ad5a706b66eaee4814fcc5ea45e
Author: Alex Zinenko <zinenko at google.com>
Date: 2022-04-14 (Thu, 14 Apr 2022)
Changed paths:
M mlir/include/mlir/Dialect/CMakeLists.txt
A mlir/include/mlir/Dialect/Transform/CMakeLists.txt
A mlir/include/mlir/Dialect/Transform/IR/CMakeLists.txt
A mlir/include/mlir/Dialect/Transform/IR/TransformDialect.h
A mlir/include/mlir/Dialect/Transform/IR/TransformDialect.td
A mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
A mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.td
M mlir/include/mlir/InitAllDialects.h
M mlir/lib/Dialect/CMakeLists.txt
A mlir/lib/Dialect/Transform/CMakeLists.txt
A mlir/lib/Dialect/Transform/IR/CMakeLists.txt
A mlir/lib/Dialect/Transform/IR/TransformDialect.cpp
A mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
A mlir/test/Dialect/Transform/test-dialect-injection.mlir
A mlir/test/Dialect/Transform/test-interpreter.mlir
M mlir/test/lib/Dialect/CMakeLists.txt
A mlir/test/lib/Dialect/Transform/CMakeLists.txt
A mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
A mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.h
A mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td
A mlir/test/lib/Dialect/Transform/TestTransformDialectInterpreter.cpp
A mlir/test/lib/Dialect/Transform/lit.local.cfg
M mlir/test/mlir-opt/commandline.mlir
M mlir/tools/mlir-opt/CMakeLists.txt
M mlir/tools/mlir-opt/mlir-opt.cpp
M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
M utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
Log Message:
-----------
[mlir] Introduce Transform dialect
This dialect provides operations that can be used to control transformation of
the IR using a different portion of the IR. It refers to the IR being
transformed as payload IR, and to the IR guiding the transformation as
transform IR.
The main use case for this dialect is orchestrating fine-grain transformations
on individual operations or sets thereof. For example, it may involve finding
loop-like operations with specific properties (e.g., large size) in the payload
IR, applying loop tiling to those and only those operations, and then applying
loop unrolling to the inner loops produced by the previous transformations. As
such, it is not intended as a replacement for the pass infrastructure, nor for
the pattern rewriting infrastructure. In the most common case, the transform IR
will be processed and applied to payload IR by a pass. Transformations
expressed by the transform dialect may be implemented using the pattern
infrastructure or any other relevant MLIR component.
This dialect is designed to be extensible, that is, clients of this dialect are
allowed to inject additional operations into this dialect using the newly
introduced in this patch `TransformDialectExtension` mechanism. This allows the
dialect to avoid a dependency on the implementation of the transformation as
well as to avoid introducing dialect-specific transform dialects.
See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927.
Reviewed By: nicolasvasilache, Mogball, rriddle
Differential Revision: https://reviews.llvm.org/D123135
More information about the All-commits
mailing list