[all-commits] [llvm/llvm-project] 55cf0d: [mlir][Linalg] Adding a greedy packing transform d...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Thu Jan 26 14:07:31 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 55cf0de35efd6cb81d6a21fee35186f6fb6864c2
      https://github.com/llvm/llvm-project/commit/55cf0de35efd6cb81d6a21fee35186f6fb6864c2
  Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
  Date:   2023-01-26 (Thu, 26 Jan 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    A mlir/test/Dialect/Linalg/transform-pack-greedily.mlir

  Log Message:
  -----------
  [mlir][Linalg] Adding a greedy packing transform dialect op.

This PR adds a `pack_greedily` transform operation that infers the packing for gemm
subcomputations embedded within in any LinalgOp and packs accordingly.
A normalization step guarantees that we get the innermost op dimensions in one of `8`
possible `(m, n, k)` orders, specified as a parameter, from which we can emit all
packed forms.

The current implementation takes an arbitrary LinalgOp and tries to pack it along
the specified dimensions with specified sizes and inner dim permutation.

This achieves a new level of normalization and generalization for any `n-D`
LinalgOp that contains a gemm embedded within it:
we will always see a predictable packed form for any of these ops.

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




More information about the All-commits mailing list