[all-commits] [llvm/llvm-project] ad7ef1: [mlir][transform] Allow arbitrary indices to be sc...

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Wed Jul 5 01:55:48 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad7ef1923fe582a95f16a877dd75889eb347c774
      https://github.com/llvm/llvm-project/commit/ad7ef1923fe582a95f16a877dd75889eb347c774
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2023-07-05 (Wed, 05 Jul 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/include/mlir/Interfaces/ViewLikeInterface.h
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    M mlir/lib/Dialect/SCF/IR/SCF.cpp
    M mlir/lib/Dialect/Transform/Utils/Utils.cpp
    M mlir/lib/Interfaces/ViewLikeInterface.cpp
    M mlir/python/mlir/dialects/_structured_transform_ops_ext.py
    M mlir/python/mlir/ir.py
    M mlir/test/Dialect/Linalg/transform-op-tile.mlir
    M mlir/test/Dialect/Transform/ops.mlir

  Log Message:
  -----------
  [mlir][transform] Allow arbitrary indices to be scalable

This change lifts the limitation that only the trailing dimensions/sizes
in dynamic index lists can be scalable. It allows us to extend
`MaskedVectorizeOp` and `TileOp` from the Transform dialect so that the
following is allowed:

  %1, %loops:3 = transform.structured.tile %0 [4, [4], [4]]

This is also a follow up for https://reviews.llvm.org/D153372
that will enable the following (middle vector dimension is scalable):

  transform.structured.masked_vectorize %0 vector_sizes [2, [4], 8]

To facilate this change, the hooks for parsing and printing dynamic
index lists are updated accordingly (`printDynamicIndexList` and
`parseDynamicIndexList`, respectively). `MaskedVectorizeOp` and `TileOp`
are updated to include an array of attribute of bools that captures
whether the corresponding vector dimension/tile size, respectively, are
scalable or not.

NOTE 1: I am re-landing this after the initial version was reverted. To
fix the regression and in addition to the original patch, this revision
updates the Python bindings for the transform dialect

NOTE 2: This change is a part of a larger effort to enable scalable
vectorisation in Linalg. See this RFC for more context:
  * https://discourse.llvm.org/t/rfc-scalable-vectorisation-in-linalg/

This relands 048764f23a380fd6f8cc562a0008dcc6095fb594 with fixes.

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




More information about the All-commits mailing list