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

Javed Absar llvmlistbot at llvm.org
Thu Oct 17 16:01:09 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>
+
----------------
javedabsar1 wrote:

why the empty line above return? I see pre-existing above had same. But these are not needed i suppose. 

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


More information about the Mlir-commits mailing list