[all-commits] [llvm/llvm-project] 6f2ba4: [mlir] Fix ComposeExpandOfCollapseOp for dynamic c...

Ian Wood via All-commits all-commits at lists.llvm.org
Wed Jun 11 14:34:23 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f2ba4712f17d7c82228a5b705570571e13a3832
      https://github.com/llvm/llvm-project/commit/6f2ba4712f17d7c82228a5b705570571e13a3832
  Author: Ian Wood <ianwood2024 at u.northwestern.edu>
  Date:   2025-06-11 (Wed, 11 Jun 2025)

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

  Log Message:
  -----------
  [mlir] Fix ComposeExpandOfCollapseOp for dynamic case (#142663)

Changes `findCollapsingReassociation` to return nullopt in all cases
where source shape has `>=2` dynamic dims. `expand(collapse)` can
reshape to in any valid output shape but a collapse can only collapse
contiguous dimensions. When there are `>=2` dynamic dimensions it is
impossible to determine if it can be simplified to a collapse or if it
is preforming a more advanced reassociation.


This problem was uncovered by
https://github.com/llvm/llvm-project/pull/137963

---------

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