[Mlir-commits] [mlir] [mlir][Transforms] Add missing check in applyPermutation (PR #102099)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Aug 9 01:22:18 PDT 2024
================
@@ -36,3 +36,14 @@ func.func @rfft2d_with_non_float_type(%arg0 : tensor<1x1x1xi32>) -> (tensor<1x1x
%real, %imag = tosa.rfft2d %arg0 : (tensor<1x1x1xi32>) -> (tensor<1x1x1xi32>, tensor<1x1x1xi32>)
return %real, %imag : tensor<1x1x1xi32>, tensor<1x1x1xi32>
}
+
+// -----
+
+// CHECK-LABEL: @test_invalid_constant_permutation
+func.func @test_invalid_constant_permutation() {
+ // expected-error at +3 {{permutation must be within input bounds}}
+ %14 = tensor.empty() : tensor<3x4x5xi32>
+ %c1 = arith.constant dense<[3, 0, 1]> : tensor<3xi32>
+ %72 = tosa.transpose %14, %c1 : (tensor<3x4x5xi32>, tensor<3xi32>) -> tensor<3x4x5xi32>
----------------
DarshanRamakant wrote:
Updated
https://github.com/llvm/llvm-project/pull/102099
More information about the Mlir-commits
mailing list