[all-commits] [llvm/llvm-project] ff6e55: [mlir] Structured transforms: introduce op splitting

ftynse via All-commits all-commits at lists.llvm.org
Thu Jul 7 04:20:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ff6e5508d686395dfb5f26085fadeae174847d52
      https://github.com/llvm/llvm-project/commit/ff6e5508d686395dfb5f26085fadeae174847d52
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2022-07-07 (Thu, 07 Jul 2022)

  Changed paths:
    M mlir/include/mlir-c/BuiltinTypes.h
    M mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/lib/Bindings/Python/IRTypes.cpp
    M mlir/lib/CAPI/IR/BuiltinTypes.cpp
    M mlir/lib/Dialect/Affine/IR/AffineOps.cpp
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/Split.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    M mlir/python/mlir/dialects/_structured_transform_ops_ext.py
    A mlir/test/Dialect/Linalg/transform-op-split.mlir
    M mlir/test/python/dialects/transform_structured_ext.py

  Log Message:
  -----------
  [mlir] Structured transforms: introduce op splitting

Introduce a new transformation on structured ops that splits the iteration
space into two parts along the specified dimension. The index at which the
splitting happens may be static or dynamic. This transformation can be seen as
a rudimentary form of index-set splitting that only supports the splitting
along hyperplanes parallel to the iteration space hyperplanes, and is therefore
decomposable into per-dimension application.

It is a key low-level transformation that enables independent scheduling for
different parts of the iteration space of the same op, which hasn't been
possible previously. It may be used to implement, e.g., multi-sized tiling. In
future, peeling can be implemented as a combination of split-off amount
computation and splitting.

The transformation is conceptually close to tiling in its separation of the
iteration and data spaces, but cannot be currently implemented on top of
TilingInterface as the latter does not properly support `linalg.index`
offsetting.

Note that the transformation intentionally bypasses folding of
`tensor.extract_slice` operations when creating them as this folding was found
to prevent repeated splitting of the same operation because due to internal
assumptions about extract/insert_slice combination in dialect utilities.

Reviewed By: nicolasvasilache

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


  Commit: 8e03bfc368f72a4f97129b0837396e69ae2ba1fe
      https://github.com/llvm/llvm-project/commit/8e03bfc368f72a4f97129b0837396e69ae2ba1fe
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2022-07-07 (Thu, 07 Jul 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
    M mlir/lib/Dialect/Transform/IR/TransformOps.cpp
    M mlir/python/mlir/dialects/_transform_ops_ext.py
    M mlir/test/Dialect/Transform/test-interpreter.mlir
    M mlir/test/python/dialects/transform.py

  Log Message:
  -----------
  [mlir] Transform dialect: introduce merge_handles op

This Transform dialect op allows one to merge the lists of Payload IR
operations pointed to by several handles into a single list associated with one
handle. This is an important Transform dialect usability improvement for cases
where transformations may temporarily diverge for different groups of Payload
IR ops before converging back to the same script. Without this op, several
copies of the trailing transformations would have to be present in the
transformation script.

Depends On D129090

Reviewed By: nicolasvasilache

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


Compare: https://github.com/llvm/llvm-project/compare/1d9086bf054c...8e03bfc368f7


More information about the All-commits mailing list