[all-commits] [llvm/llvm-project] 0f297c: [mlir][tensor][linalg] Introduce DataLayoutPropaga...

Han-Chung Wang via All-commits all-commits at lists.llvm.org
Tue Dec 6 15:00:24 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f297cad4d5b5ccb69c2e8610d7da4891cbf1f6b
      https://github.com/llvm/llvm-project/commit/0f297cad4d5b5ccb69c2e8610d7da4891cbf1f6b
  Author: Hanhan Wang <hanchung at google.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    A mlir/test/Dialect/Linalg/data-layout-propagation.mlir
    M mlir/test/lib/Dialect/Linalg/CMakeLists.txt
    A mlir/test/lib/Dialect/Linalg/TestDataLayoutPropagation.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir][tensor][linalg] Introduce DataLayoutPropagation pass.

It introduces a pattern that swaps `linalg.generic + tensor.pack` to
`tensor.pack + linalg.generic`. It requires all the iteration types
being parallel; the indexing map of output operand is identiy. They can
all be relaxed in the future.

The user can decide whether the propagation should be applied or not by
passing a control function.

Reviewed By: mravishankar

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




More information about the All-commits mailing list