[Mlir-commits] [mlir] [MLIR][Linalg] pack, unpack to take memref inputs (PR #129036)
Han-Chung Wang
llvmlistbot at llvm.org
Thu Apr 3 11:26:19 PDT 2025
================
@@ -1666,3 +1666,40 @@ func.func @unpack_static_inner_tile_size_and_dynamic_output_shape(
%0 = linalg.unpack %input inner_dims_pos = [0, 1] inner_tiles = [8, 4] into %output : tensor<?x?x?x4xf32> -> tensor<?x?xf32>
return %0 : tensor<?x?xf32>
}
+
+// -----
+
+func.func @pack_source_dest_type_mismatch_1(%source: tensor<128x256xf32>, %dest: memref<8x16x8x32xf32>) {
+ // expected-error at +1 {{mixing tensor and buffer semantics is not allowed}}
+ linalg.pack %source outer_dims_perm = [1, 0] inner_dims_pos = [0, 1] inner_tiles = [8, 32]
+ into %dest : tensor<128x256xf32> -> memref<8x16x8x32xf32>
+ return
+}
+
+
----------------
hanhanW wrote:
nit: delete one blank line
https://github.com/llvm/llvm-project/pull/129036
More information about the Mlir-commits
mailing list