[all-commits] [llvm/llvm-project] 96ff02: [mlir] cleanup of structured.tile* transform ops (...

ftynse via All-commits all-commits at lists.llvm.org
Tue Sep 26 00:14:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 96ff0255f2ecd0bd5d1aba650a99e046a4bd5ec6
      https://github.com/llvm/llvm-project/commit/96ff0255f2ecd0bd5d1aba650a99e046a4bd5ec6
  Author: Oleksandr "Alex" Zinenko <zinenko at google.com>
  Date:   2023-09-26 (Tue, 26 Sep 2023)

  Changed paths:
    M mlir/docs/Tutorials/transform/Ch1.md
    M mlir/docs/Tutorials/transform/Ch2.md
    M mlir/docs/Tutorials/transform/ChH.md
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    M mlir/python/mlir/dialects/_structured_transform_ops_ext.py
    M mlir/test/Dialect/Affine/loop-tiling-parametric.mlir
    M mlir/test/Dialect/Affine/loop-tiling.mlir
    M mlir/test/Dialect/GPU/transform-gpu-failing.mlir
    M mlir/test/Dialect/LLVM/transform-e2e.mlir
    M mlir/test/Dialect/Linalg/generalize-tensor-pack-tile.mlir
    M mlir/test/Dialect/Linalg/generalize-tensor-unpack-tile.mlir
    M mlir/test/Dialect/Linalg/matmul-shared-memory-padding.mlir
    M mlir/test/Dialect/Linalg/multisize-tiling-full.mlir
    M mlir/test/Dialect/Linalg/promote.mlir
    M mlir/test/Dialect/Linalg/promotion_options.mlir
    M mlir/test/Dialect/Linalg/tile-conv.mlir
    M mlir/test/Dialect/Linalg/tile-indexed.mlir
    M mlir/test/Dialect/Linalg/tile-softmax.mlir
    M mlir/test/Dialect/Linalg/tile-tensors.mlir
    M mlir/test/Dialect/Linalg/tile-to-forall.mlir
    M mlir/test/Dialect/Linalg/transform-op-compose-masked-vectorize-and-cleanups.mlir
    M mlir/test/Dialect/Linalg/transform-op-fuse-into-containing.mlir
    M mlir/test/Dialect/Linalg/transform-op-fuse.mlir
    M mlir/test/Dialect/Linalg/transform-op-hoist-pad-build-packing-loop-nest.mlir
    M mlir/test/Dialect/Linalg/transform-op-hoist-pad.mlir
    M mlir/test/Dialect/Linalg/transform-op-scalarize.mlir
    M mlir/test/Dialect/Linalg/transform-op-tile.mlir
    M mlir/test/Dialect/Linalg/transform-ops.mlir
    M mlir/test/Dialect/Linalg/transform-patterns.mlir
    M mlir/test/Dialect/Linalg/transform-tile-and-fuse.mlir
    M mlir/test/Dialect/Linalg/transform-tile-reduction.mlir
    M mlir/test/Dialect/SCF/transform-loop-fuse-sibling.mlir
    M mlir/test/Dialect/SCF/transform-op-take-assumed-branch.mlir
    M mlir/test/Dialect/Tensor/tiling.mlir
    M mlir/test/Dialect/Transform/ops.mlir
    M mlir/test/Dialect/Transform/selective-targeting.mlir
    M mlir/test/Dialect/Vector/transform-vector.mlir
    M mlir/test/Examples/transform/Ch1/invalidation-1.mlir
    M mlir/test/Examples/transform/Ch1/invalidation-2.mlir
    M mlir/test/Examples/transform/Ch1/sequence.mlir
    M mlir/test/Examples/transform/Ch2/sequence.mlir
    M mlir/test/Examples/transform/Ch3/sequence.mlir
    M mlir/test/Examples/transform/ChH/full.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir
    M mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir
    M mlir/test/python/dialects/transform_structured_ext.py

  Log Message:
  -----------
  [mlir] cleanup of structured.tile* transform ops (#67320)

Rename and restructure tiling-related transform ops from the structured
extension to be more homogeneous. In particular, all ops now follow a
consistent naming scheme:

 - `transform.structured.tile_using_for`;
 - `transform.structured.tile_using_forall`;
 - `transform.structured.tile_reduction_using_for`;
 - `transform.structured.tile_reduction_using_forall`.

This drops the "_op" naming artifact from `tile_to_forall_op` that
shouldn't have been included in the first place, consistently specifies
the name of the control flow op to be produced for loops (instead of
`tile_reduction_using_scf` since `scf.forall` also belongs to `scf`),
and opts for the `using` connector to avoid ambiguity.

The loops produced by tiling are now systematically placed as *trailing*
results of the transform op. While this required changing 3 out of 4 ops
(except for `tile_using_for`), this is the only choice that makes sense
when producing multiple `scf.for` ops that can be associated with a
variadic number of handles. This choice is also most consistent with
*other* transform ops from the structured extension, in particular with
fusion ops, that produce the structured op as the leading result and the
loop as the trailing result.




More information about the All-commits mailing list