[Mlir-commits] [mlir] [MLIR] Don't drop attached custom attributes (PR #111261)

Prashant Kumar llvmlistbot at llvm.org
Sat Oct 5 23:19:47 PDT 2024


================
@@ -2707,3 +2707,14 @@ func.func @test_destination_multiple_result(%arg0: tensor<2x2xf32>, %arg1: tenso
   %0:2 = test.destination_style_op ins(%cast : tensor<?x2xf32>) outs(%cast_0 : tensor<?x2xf32>) -> tensor<?x2xf32>, index
   return %0#1 : index
 }
+
+// -----
+
+// CHECK-LABEL:   func.func @pack_dont_drop_attributes(
+// CHECK: tensor.pack {{.*}}  {test_attr = 16 : i64}
+func.func @pack_dont_drop_attributes(%arg0: tensor<?x?x?xf16>, %arg1: tensor<128x?x100x16x1xf16>) -> tensor<128x?x100x16x1xf16> {
+  %c32_i64 = arith.constant 32 : i64
+  %cst = arith.constant 0.000000e+00 : f16
+  %pack = tensor.pack %arg0 padding_value(%cst : f16) outer_dims_perm = [0, 1, 2] inner_dims_pos = [1, 2] inner_tiles = [16, 1] into %arg1 {test_attr = 16 : i64} : tensor<?x?x?xf16> -> tensor<128x?x100x16x1xf16>
----------------
pashu123 wrote:

done.

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


More information about the Mlir-commits mailing list