[all-commits] [llvm/llvm-project] 644f0f: [mlir][tensor][linalg] Add a pattern that generali...

Han-Chung Wang via All-commits all-commits at lists.llvm.org
Thu Dec 15 15:28:27 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 644f0f834d21250cf92a7c8d3b17aa1b683571f5
      https://github.com/llvm/llvm-project/commit/644f0f834d21250cf92a7c8d3b17aa1b683571f5
  Author: Hanhan Wang <hanchung at google.com>
  Date:   2022-12-15 (Thu, 15 Dec 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
    A mlir/test/Dialect/Linalg/generalize-tensor-pack.mlir
    M mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp

  Log Message:
  -----------
  [mlir][tensor][linalg] Add a pattern that generalizes tensor.pack op.

The pattern generalizes a tensor::PackOp into a sequence of tensor +
Linalg ops, when the outer dims are all 1s. It uses the trick of
rank-reduced tensor.extract_slice to get the tile; transpose the tile;
use tensor.insert_slice to insert it to the destination of inner tile.

Reviewed By: pifon2a, tyb0807

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




More information about the All-commits mailing list