[all-commits] [llvm/llvm-project] 1bf087: [mlir][Transform] Create a transform interpreter a...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Wed Oct 11 14:56:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1bf0870934542de7e2d054d124058037ffa0a625
      https://github.com/llvm/llvm-project/commit/1bf0870934542de7e2d054d124058037ffa0a625
  Author: Nicolas Vasilache <nicolasvasilache at users.noreply.github.com>
  Date:   2023-10-11 (Wed, 11 Oct 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Transform/Transforms/Passes.td
    M mlir/include/mlir/Dialect/Transform/Transforms/TransformInterpreterUtils.h
    M mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
    M mlir/lib/Dialect/Transform/IR/TransformOps.cpp
    M mlir/lib/Dialect/Transform/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Transform/Transforms/InterpreterPass.cpp
    A mlir/lib/Dialect/Transform/Transforms/PreloadLibraryPass.cpp
    M mlir/lib/Dialect/Transform/Transforms/TransformInterpreterPassBase.cpp
    M mlir/lib/Dialect/Transform/Transforms/TransformInterpreterUtils.cpp
    A mlir/test/Dialect/LLVM/lower-to-llvm-e2e-with-target-tag.mlir
    R mlir/test/Dialect/LLVM/lower-to-llvm-e2e.mlir
    A mlir/test/Dialect/Transform/Library/lower-to-llvm.mlir
    M utils/bazel/llvm-project-overlay/mlir/test/Dialect/BUILD.bazel

  Log Message:
  -----------
  [mlir][Transform] Create a transform interpreter and a preloader pass (#68661)

This revision provides the ability to use an arbitrary named sequence op
as
the entry point to a transform dialect strategy.

It is also a step towards better transform dialect usage in pass
pipelines
that need to preload a transform library rather thanparse it on the fly.

The interpreter itself is significantly simpler than its testing
counterpart
by avoiding payload/debug root tags and multiple shared modules.

In the process, the NamedSequenceOp::apply function is adapted to allow
it
being an entry point.

NamedSequenceOp is **not** extended to take the PossibleTopLevelTrait at
this
time, because the implementation of the trait is specific to allowing
one
top-level dangling op with a region such as SequenceOp or
AlternativesOp.
In particular, the verifier of PossibleTopLevelTrait does not allow for
an
empty body, which is necessary to declare a NamedSequenceOp that gets
linked
in separately before application.

In the future, we should dispense with the PossibleTopLevelTrait
altogether
and always enter the interpreter with a NamedSequenceOp.

Lastly, relevant TD linking utilities are moved to
TransformInterpreterUtils
and reused from there.




More information about the All-commits mailing list