[all-commits] [llvm/llvm-project] 5a0011: [mlir][Linalg] Retire LinalgPromotion pattern

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Thu Jul 14 05:39:22 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a0011360c9cea0fdc182c8c66ed3bc774a50835
      https://github.com/llvm/llvm-project/commit/5a0011360c9cea0fdc182c8c66ed3bc774a50835
  Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
  Date:   2022-07-14 (Thu, 14 Jul 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/include/mlir/Dialect/Linalg/Passes.td
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/CodegenStrategy.h
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgStrategyPasses.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
    M mlir/test/Dialect/Linalg/promote.mlir
    M mlir/test/Dialect/Linalg/promotion_options.mlir
    R mlir/test/Dialect/Linalg/transform-patterns-matmul-to-vector.mlir
    M mlir/test/Dialect/Linalg/transform-patterns.mlir
    A mlir/test/Dialect/Linalg/transform-promotion.mlir
    M mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp

  Log Message:
  -----------
  [mlir][Linalg] Retire LinalgPromotion pattern

This revision removes the LinalgPromotion pattern and adds a `transform.structured.promotion` op.
Since the LinalgPromotion transform allows the injection of arbitrary C++ via lambdas, the current
transform op does not handle it.
It is left for future work to decide what the right transform op control is for those cases.

Note the underlying implementation remains unchanged and the mechanism is still controllable by
lambdas from the API.

During this refactoring it was also determined that the `dynamicBuffers` option does not actually
connect to a change of behavior in the algorithm.
This also exhibits that the related test is wrong (and dangerous).
Both the option and the test are therefore removed.

Lastly, a test that connects patterns using the filter-based mechanism is removed: all the independent
pieces are already tested separately.

Context: https://discourse.llvm.org/t/psa-retire-linalg-filter-based-patterns/63785

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




More information about the All-commits mailing list