[Mlir-commits] [mlir] [mlir][tensor] Add tests to invalid.mlir (PR #112759)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Oct 18 00:57:03 PDT 2024


================
@@ -213,6 +213,27 @@ func.func @extract_slice_wrong_result_rank(%t: tensor<?xf32>, %idx : index) {
   return
 }
 
+
+// -----
+
+func.func @extract_slice_size_and_output_dim_mismatch_static_size(%t: tensor<16xf32>) {
+  // expected-error @+1 {{expected type to be 'tensor<4xf32>' or a rank-reduced version. (size mismatch)}}
+  %0 = tensor.extract_slice %t[0][4][1]
+    : tensor<16xf32> to tensor<6xf32>
+
----------------
banach-space wrote:

That's now fixed, thanks!

https://github.com/llvm/llvm-project/pull/112759


More information about the Mlir-commits mailing list