[Mlir-commits] [mlir] [MLIR] Fix a crash in CollapseLinalgDimensions (PR #181715)
Darshan Bhat
llvmlistbot at llvm.org
Tue Feb 17 09:13:16 PST 2026
================
@@ -1348,6 +1348,10 @@ bool mlir::linalg::isDimSequencePreserved(AffineMap indexingMap,
bool mlir::linalg::areDimSequencesPreserved(
ArrayRef<AffineMap> maps, ArrayRef<ReassociationIndices> dimSequences) {
return llvm::all_of(maps, [&](AffineMap map) {
+ // Dimension sequences can only be preserved in projected permutation maps.
+ if (!map.isProjectedPermutation()) {
----------------
darshan-opensource wrote:
There is already an assertion inside `isDimSequencesPreserved`. So it assumes that the input affineMap is already dimSequencePreserved. Do you want me to convert that assertion into a check and return false ?
https://github.com/llvm/llvm-project/pull/181715
More information about the Mlir-commits
mailing list