[all-commits] [llvm/llvm-project] 0f3e46: [mlir][Tensor] Generalize the pattern to swap `ten...
MaheshRavishankar via All-commits
all-commits at lists.llvm.org
Tue Apr 15 14:10:40 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0f3e460e06e03ce37445546457a16d6f1eee1e21
https://github.com/llvm/llvm-project/commit/0f3e460e06e03ce37445546457a16d6f1eee1e21
Author: MaheshRavishankar <1663364+MaheshRavishankar at users.noreply.github.com>
Date: 2025-04-15 (Tue, 15 Apr 2025)
Changed paths:
M mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp
M mlir/test/Dialect/Tensor/bubble-reshapes.mlir
Log Message:
-----------
[mlir][Tensor] Generalize the pattern to swap `tensor.collapse_shape` -> `tensor.expand_shape`. (#133819)
The current patterns compared the reassocation indices for the two ops
and failed if neither of them were of size 1. This patch relaxes this
restriction by handling a new case where the reassociation indices might
be of the same size.
Also generalizes to cases where when generating the swapped
`tensor.expand_shape` -> `tensor.collapse_shape` if one of them is
degenerate, those are not generated.
Signed-off-by: MaheshRavishankar <mahesh.ravishankar at gmail.com>
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