[all-commits] [llvm/llvm-project] fcfdab: [MLIR] Improve compose expand(collapse) pattern (#...

Ian Wood via All-commits all-commits at lists.llvm.org
Mon Dec 2 08:34:49 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fcfdabfea18b4d2dd98a1c5b52d5b33aff77ae1a
      https://github.com/llvm/llvm-project/commit/fcfdabfea18b4d2dd98a1c5b52d5b33aff77ae1a
  Author: Ian Wood <ianwood2024 at u.northwestern.edu>
  Date:   2024-12-02 (Mon, 02 Dec 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/Utils/ReshapeOpsUtils.h
    M mlir/test/Dialect/Tensor/canonicalize.mlir

  Log Message:
  -----------
  [MLIR] Improve compose expand(collapse) pattern (#117768)

If expand(collapse) has a dimension that gets collapsed and then
expanded to the same shape, the pattern would fail to canonicalize this
to a single collapse shape. Line 341 was changed because the
expand(collapse) could be a reinterpret-cast like sequence where the
shapes differ but the rank is the same. This cannot be represented by a
single `collapse_shape` op.

Signed-off-by: Ian Wood <ianwood2024 at u.northwestern.edu>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list