[Mlir-commits] [mlir] [mlir][Transforms] Add missing check in applyPermutation (PR #102099)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Aug 9 01:11:21 PDT 2024
================
@@ -1116,6 +1116,12 @@ LogicalResult tosa::TransposeOp::verify() {
"Unexpectedly found permutation tensor without rank");
if (!isPermutationVector(constantPerms))
return emitOpError() << "expected valid permutation tensor";
+
+ if (inputType.hasRank() && (!inputType.getNumDynamicDims()) &&
----------------
DarshanRamakant wrote:
Without that the existing behaviour will change. Couple of test cases in the shape-inference will give a different behaviour without that check
`https://github.com/llvm/llvm-project/blob/50a2b31800a554b35367a5f3bcebb640703a48e1/mlir/test/Dialect/Tosa/tosa-infer-shapes.mlir#L1398`
Above testcase will be having a different behaviour if we do it for dynamic shapes. So I tried to retain the original behaviour with that check.
https://github.com/llvm/llvm-project/pull/102099
More information about the Mlir-commits
mailing list