Repository: xdslproject/xdsl
Pull request #4389: dialects: (builtin) deprecate from_list
Author: login: alexarice
Labels: name: dialects
description: Changes on the dialects
Created: 2025-05-13T15:04:02Z | Merged: 2025-05-14T09:00:32Z

Final deprecation


Diff:
diff --git a/docs/Toy/Toy_Ch3.ipynb b/docs/Toy/Toy_Ch3.ipynb
index c5103a8d34..d5505de16a 100644
--- a/docs/Toy/Toy_Ch3.ipynb
+++ b/docs/Toy/Toy_Ch3.ipynb
@@ -242,7 +242,7 @@
     "\n",
     "        assert isa(op.res.type, toy.TensorTypeF64)\n",
     "\n",
-    "        new_value = DenseIntOrFPElementsAttr.from_list(\n",
+    "        new_value = DenseIntOrFPElementsAttr.create_dense_float(\n",
     "            type=op.res.type, data=reshape_input_op.value.get_values()\n",
     "        )\n",
     "        new_op = toy.ConstantOp(new_value)\n",
diff --git a/tests/dialects/test_builtin.py b/tests/dialects/test_builtin.py
index a8520a2b89..55286462d7 100644
--- a/tests/dialects/test_builtin.py
+++ b/tests/dialects/test_builtin.py
@@ -7,7 +7,6 @@
 from xdsl.dialects.arith import ConstantOp
 from xdsl.dialects.builtin import (
     AnyFloat,
-    AnyTensorType,
     ArrayAttr,
     BFloat16Type,
     BoolAttr,
@@ -338,7 +337,7 @@ def test_IntegerType_packing():
 
 
 def test_DenseIntOrFPElementsAttr_fp_type_conversion():
-    check1 = DenseIntOrFPElementsAttr.tensor_from_list([4, 5], f32, [2])
+    check1 = DenseIntOrFPElementsAttr.create_dense_float(TensorType(f64, [2]), [4, 5])
 
     value1 = check1.get_attrs()[0].value.data
     value2 = check1.get_attrs()[1].value.data
@@ -352,7 +351,7 @@ def test_DenseIntOrFPElementsAttr_fp_type_conversion():
     t1 = FloatAttr(4.0, f32)
     t2 = FloatAttr(5.0, f32)
 
-    check2 = DenseIntOrFPElementsAttr.tensor_from_list([t1, t2], f32, [2])
+    check2 = DenseIntOrFPElementsAttr.create_dense_float(TensorType(f32, [2]), [t1, t2])
 
     value3 = check2.get_attrs()[0].value.data
     value4 = check2.get_attrs()[1].value.data
@@ -378,10 +377,10 @@ def test_DenseIntOrFPElementsAttr_splat():
     assert attr_float.is_splat()
 
 
-def test_DenseIntOrFPElementsAttr_from_list():
+def test_DenseIntOrFPElementsAttr_initialization():
     # legal zero-rank tensor
-    attr = DenseIntOrFPElementsAttr.tensor_from_list([5.5], f32, [])
-    assert attr.type == AnyTensorType(f32, [])
+    attr = DenseIntOrFPElementsAttr.create_dense_float(TensorType(f32, []), [5.5])
+    assert attr.type == TensorType(f32, [])
     assert len(attr) == 1
 
     # illegal zero-rank tensor
@@ -389,27 +388,23 @@ def test_DenseIntOrFPElementsAttr_from_list():
         VerifyException,
         match="A zero-rank tensor can only hold 1 value but 2 were given.",
     ):
-        DenseIntOrFPElementsAttr.tensor_from_list([5.5, 5.6], f32, [])
+        DenseIntOrFPElementsAttr.create_dense_float(TensorType(f32, []), [5.5, 5.6])
 
     # legal 1 element tensor
-    attr = DenseIntOrFPElementsAttr.tensor_from_list([5.5], f32, [1])
-    assert attr.type == AnyTensorType(f32, [1])
+    attr = DenseIntOrFPElementsAttr.create_dense_float(TensorType(f32, [1]), [5.5])
+    assert attr.type == TensorType(f32, [1])
     assert len(attr) == 1
 
     # legal normal tensor
-    attr = DenseIntOrFPElementsAttr.tensor_from_list([5.5, 5.6], f32, [2])
-    assert attr.type == AnyTensorType(f32, [2])
+    attr = DenseIntOrFPElementsAttr.create_dense_float(TensorType(f32, [2]), [5.5, 5.6])
+    assert attr.type == TensorType(f32, [2])
     assert len(attr) == 2
 
-    # splat initialization
-    attr = DenseIntOrFPElementsAttr.tensor_from_list([4], f32, [4])
-    assert attr.type == AnyTensorType(f32, [4])
-    assert tuple(attr.get_values()) == (4, 4, 4, 4)
-    assert len(attr) == 4
-
 
 def test_DenseIntOrFPElementsAttr_values():
-    int_attr = DenseIntOrFPElementsAttr.tensor_from_list([1, 2, 3, 4], i32, [4])
+    int_attr = DenseIntOrFPElementsAttr.create_dense_int(
+        TensorType(i32, [4]), [1, 2, 3, 4]
+    )
     assert tuple(int_attr.get_values()) == (1, 2, 3, 4)
     assert tuple(int_attr.iter_values()) == (1, 2, 3, 4)
     assert tuple(int_attr.get_attrs()) == (
@@ -425,8 +420,8 @@ def test_DenseIntOrFPElementsAttr_values():
         IntegerAttr(4, i32),
     )
 
-    index_attr = DenseIntOrFPElementsAttr.tensor_from_list(
-        [1, 2, 3, 4], IndexType(), [4]
+    index_attr = DenseIntOrFPElementsAttr.create_dense_int(
+        TensorType(IndexType(), [4]), [1, 2, 3, 4]
     )
     assert tuple(index_attr.get_values()) == (1, 2, 3, 4)
     assert tuple(index_attr.iter_values()) == (1, 2, 3, 4)
@@ -443,8 +438,9 @@ def test_DenseIntOrFPElementsAttr_values():
         IntegerAttr(4, IndexType()),
     )
 
-    float_attr = DenseIntOrFPElementsAttr.tensor_from_list(
-        [1.0, 2.0, 3.0, 4.0], f32, [4]
+    float_attr = DenseIntOrFPElementsAttr.create_dense_float(
+        TensorType(f32, [4]),
+        [1.0, 2.0, 3.0, 4.0],
     )
     assert tuple(float_attr.get_values()) == (1.0, 2.0, 3.0, 4.0)
     assert tuple(float_attr.iter_values()) == (1.0, 2.0, 3.0, 4.0)
diff --git a/tests/dialects/test_math.py b/tests/dialects/test_math.py
index f57e5c3846..14e2432501 100644
--- a/tests/dialects/test_math.py
+++ b/tests/dialects/test_math.py
@@ -4,6 +4,7 @@
 from xdsl.dialects.builtin import (
     DenseIntOrFPElementsAttr,
     FloatAttr,
+    TensorType,
     VectorType,
     f32,
     i32,
@@ -60,7 +61,9 @@ class Test_float_math_binary_construction:
     lhs_vector = TestOp([lhs_vector_ssa_value], result_types=[f32_vector_type])
     rhs_vector = TestOp([rhs_vector_ssa_value], result_types=[f32_vector_type])
 
-    f32_tensor_type = DenseIntOrFPElementsAttr.tensor_from_list([5.5], f32, [])
+    f32_tensor_type = DenseIntOrFPElementsAttr.create_dense_float(
+        TensorType(f32, []), [5.5]
+    )
     lhs_tensor_ssa_value = create_ssa_value(f32_tensor_type)
     rhs_tensor_ssa_value = create_ssa_value(f32_tensor_type)
 
@@ -134,7 +137,9 @@ class Test_float_math_unary_constructions:
     test_vector_ssa = create_ssa_value(f32_vector_type)
     test_vec = TestOp([test_vector_ssa], result_types=[f32_vector_type])
 
-    f32_tensor_type = DenseIntOrFPElementsAttr.tensor_from_list([5.5], f32, [])
+    f32_tensor_type = DenseIntOrFPElementsAttr.create_dense_float(
+        TensorType(f32, []), [5.5]
+    )
     test_tensor_ssa_value = create_ssa_value(f32_tensor_type)
     test_tensor = TestOp([test_tensor_ssa_value], result_types=[f32_tensor_type])
 
@@ -256,7 +261,9 @@ class Test_fpowi:
     a_vector_ssa_value = create_ssa_value(f32_vector_type)
     a_vector = TestOp([a_vector_ssa_value], result_types=[f32_vector_type])
 
-    f32_tensor_type = DenseIntOrFPElementsAttr.tensor_from_list([5.5], f32, [])
+    f32_tensor_type = DenseIntOrFPElementsAttr.create_dense_float(
+        TensorType(f32, []), [5.5]
+    )
     a_tensor_ssa_value = create_ssa_value(f32_tensor_type)
     a_tensor = TestOp([a_tensor_ssa_value], result_types=[f32_tensor_type])
 
@@ -293,7 +300,9 @@ class Test_fma:
     b_vec = TestOp([test_vector_ssa], result_types=[f32_vector_type])
     c_vec = TestOp([test_vector_ssa], result_types=[f32_vector_type])
 
-    f32_tensor_type = DenseIntOrFPElementsAttr.tensor_from_list([5.5], f32, [])
+    f32_tensor_type = DenseIntOrFPElementsAttr.create_dense_float(
+        TensorType(f32, []), [5.5]
+    )
     test_tensor_ssa = create_ssa_value(f32_vector_type)
     a_tensor = TestOp([test_tensor_ssa], result_types=[f32_tensor_type])
     b_tensor = TestOp([test_tensor_ssa], result_types=[f32_tensor_type])
@@ -330,7 +339,9 @@ class Test_int_math_unary_constructions:
     test_vector_ssa = create_ssa_value(i32_vector_type)
     test_vec = TestOp([test_vector_ssa], result_types=[i32_vector_type])
 
-    i32_tensor_type = DenseIntOrFPElementsAttr.tensor_from_list([5], i32, [])
+    i32_tensor_type = DenseIntOrFPElementsAttr.create_dense_int(
+        TensorType(i32, []), [5]
+    )
     test_tensor_ssa_value = create_ssa_value(i32_tensor_type)
     test_tensor = TestOp([test_tensor_ssa_value], result_types=[i32_tensor_type])
 
@@ -400,7 +411,9 @@ class Test_Trunci:
     test_vector_ssa = create_ssa_value(i32_vector_type)
     test_vec = TestOp([test_vector_ssa], result_types=[i32_vector_type])
 
-    i32_tensor_type = DenseIntOrFPElementsAttr.tensor_from_list([5], i32, [])
+    i32_tensor_type = DenseIntOrFPElementsAttr.create_dense_int(
+        TensorType(i32, []), [5]
+    )
     test_tensor_ssa_value = create_ssa_value(i32_tensor_type)
     test_tensor = TestOp([test_tensor_ssa_value], result_types=[i32_tensor_type])
 
diff --git a/tests/interpreters/test_linalg_interpreter.py b/tests/interpreters/test_linalg_interpreter.py
index 59393895e1..febee03961 100644
--- a/tests/interpreters/test_linalg_interpreter.py
+++ b/tests/interpreters/test_linalg_interpreter.py
@@ -282,8 +282,12 @@ def test_linalg_pooling_nchw_max():
         (create_ssa_value(TensorType(f32, [1, 1, 3, 3])),),
         (TensorType(f32, [1, 1, 3, 3]),),
         {
-            "dilations": DenseIntOrFPElementsAttr.tensor_from_list([1], i64, [2]),
-            "strides": DenseIntOrFPElementsAttr.tensor_from_list([1], i64, [2]),
+            "dilations": DenseIntOrFPElementsAttr.create_dense_int(
+                TensorType(i64, [2]), 1
+            ),
+            "strides": DenseIntOrFPElementsAttr.create_dense_int(
+                TensorType(i64, [2]), 1
+            ),
         },
     )
     a = ShapedArray(TypedPtr.new_float32(list(range(1, 17))), [1, 1, 4, 4])
@@ -315,8 +319,12 @@ def test_linalg_pooling_nchw_max_strides_two():
         (create_ssa_value(TensorType(f32, [1, 1, 2, 2])),),
         (TensorType(f32, [1, 1, 2, 2]),),
         {
-            "dilations": DenseIntOrFPElementsAttr.tensor_from_list([1], i64, [2]),
-            "strides": DenseIntOrFPElementsAttr.tensor_from_list([2], i64, [2]),
+            "dilations": DenseIntOrFPElementsAttr.create_dense_int(
+                TensorType(i64, [2]), 1
+            ),
+            "strides": DenseIntOrFPElementsAttr.create_dense_int(
+                TensorType(i64, [2]), 2
+            ),
         },
     )
     a = ShapedArray(
@@ -348,8 +356,12 @@ def test_linalg_conv_2d_nchw_fchw():
         (create_ssa_value(TensorType(f32, [1, 1, 3, 3])),),
         (TensorType(f32, [1, 1, 3, 3]),),
         {
-            "dilations": DenseIntOrFPElementsAttr.tensor_from_list([1], i64, [2]),
-            "strides": DenseIntOrFPElementsAttr.tensor_from_list([1], i64, [2]),
+            "dilations": DenseIntOrFPElementsAttr.create_dense_int(
+                TensorType(i64, [2]), 1
+            ),
+            "strides": DenseIntOrFPElementsAttr.create_dense_int(
+                TensorType(i64, [2]), 1
+            ),
         },
     )
     a = ShapedArray(TypedPtr.new_float32(list(range(25))), [1, 1, 5, 5])
diff --git a/tests/interpreters/test_memref_interpreter.py b/tests/interpreters/test_memref_interpreter.py
index 79e37b6ce2..71540252ec 100644
--- a/tests/interpreters/test_memref_interpreter.py
+++ b/tests/interpreters/test_memref_interpreter.py
@@ -56,7 +56,7 @@ def test_memref_get_global():
         memref.GlobalOp.get(
             StringAttr("my_global"),
             memref_type,
-            DenseIntOrFPElementsAttr.from_list(tensor_type, [1, 2, 3, 4]),
+            DenseIntOrFPElementsAttr.create_dense_int(tensor_type, [1, 2, 3, 4]),
             sym_visibility=StringAttr("public"),
         )
         with ImplicitBuilder(func.FuncOp("main", ((), ())).body):
diff --git a/tests/interpreters/test_ml_program_interpreter.py b/tests/interpreters/test_ml_program_interpreter.py
index 298c8c5ab6..c036972459 100644
--- a/tests/interpreters/test_ml_program_interpreter.py
+++ b/tests/interpreters/test_ml_program_interpreter.py
@@ -23,7 +23,7 @@ def test_ml_program_global_load_constant():
             StringAttr("my_global"),
             tensor_type,
             None,
-            DenseIntOrFPElementsAttr.from_list(tensor_type, [4]),
+            DenseIntOrFPElementsAttr.create_dense_int(tensor_type, 4),
             StringAttr("private"),
         )
         with ImplicitBuilder(func.FuncOp("main", ((), ())).body):
@@ -46,7 +46,7 @@ def test_ml_program_global_load_constant_ex2():
             StringAttr("my_global"),
             tensor_type,
             None,
-            DenseIntOrFPElementsAttr.from_list(tensor_type, [1, 320]),
+            DenseIntOrFPElementsAttr.create_dense_int(tensor_type, [1, 320]),
             StringAttr("private"),
         )
         with ImplicitBuilder(func.FuncOp("main", ((), ())).body):
diff --git a/xdsl/dialects/builtin.py b/xdsl/dialects/builtin.py
index c0346f1914..37c84750b9 100644
--- a/xdsl/dialects/builtin.py
+++ b/xdsl/dialects/builtin.py
@@ -2284,6 +2284,7 @@ def from_list(
     ) -> DenseIntOrFPElementsAttr: ...
 
     @staticmethod
+    @deprecated("Please use `create_dense_{int/float}` instead.")
     def from_list(
         type: (
             RankedStructure[AnyFloat | IntegerType | IndexType]
@@ -2295,19 +2296,22 @@ def from_list(
     ) -> DenseIntOrFPElementsAttr:
         # splat value given
         if len(data) == 1 and prod(type.get_shape()) != 1:
-            new_data = (data[0],) * prod(type.get_shape())
+            new_data = data[0]
         else:
             new_data = data
 
         if isinstance(type.element_type, AnyFloat):
             new_type = cast(RankedStructure[AnyFloat], type)
             new_data = cast(
-                Sequence[int | float] | Sequence[FloatAttr[AnyFloat]], new_data
+                float | FloatAttr | Sequence[float] | Sequence[FloatAttr[AnyFloat]],
+                new_data,
             )
             return DenseIntOrFPElementsAttr.create_dense_float(new_type, new_data)
         else:
             new_type = cast(RankedStructure[IntegerType | IndexType], type)
-            new_data = cast(Sequence[int] | Sequence[IntegerAttr], new_data)
+            new_data = cast(
+                int | IntegerAttr | Sequence[int] | Sequence[IntegerAttr], new_data
+            )
             return DenseIntOrFPElementsAttr.create_dense_int(new_type, new_data)
 
     @staticmethod
@@ -2331,6 +2335,7 @@ def vector_from_list(
             )
 
     @staticmethod
+    @deprecated("Please use `create_dense_{int/float}` instead.")
     def tensor_from_list(
         data: (
             Sequence[int]
@@ -2342,8 +2347,20 @@ def tensor_from_list(
         data_type: IntegerType | IndexType | AnyFloat,
         shape: Sequence[int],
     ) -> DenseIntOrFPElementsAttr:
-        t = TensorType(data_type, shape)
-        return DenseIntOrFPElementsAttr.from_list(t, data)
+        if isinstance(data_type, AnyFloat):
+            new_data = cast(Sequence[float] | Sequence[FloatAttr], data)
+            if len(new_data) == 1 and prod(shape) != 1:
+                new_data = new_data[0]
+            return DenseIntOrFPElementsAttr.create_dense_float(
+                TensorType(data_type, shape), new_data
+            )
+        else:
+            new_data = cast(Sequence[int] | Sequence[IntegerAttr], data)
+            if len(new_data) == 1 and prod(shape) != 1:
+                new_data = new_data[0]
+            return DenseIntOrFPElementsAttr.create_dense_int(
+                TensorType(data_type, shape), new_data
+            )
 
     def iter_values(self) -> Iterator[int] | Iterator[float]:
         """
diff --git a/xdsl/parser/attribute_parser.py b/xdsl/parser/attribute_parser.py
index a051ed0bfc..f1e9c61982 100644
--- a/xdsl/parser/attribute_parser.py
+++ b/xdsl/parser/attribute_parser.py
@@ -2,7 +2,7 @@
 
 import math
 import re
-from collections.abc import Callable
+from collections.abc import Callable, Sequence
 from dataclasses import dataclass, field
 from typing import Any, Literal, NoReturn, cast
 
@@ -820,7 +820,13 @@ def parse_dense_int_or_fp_elements_attr(
                 assert len(data_values) == 1, "Fatal error in parser"
                 data_values *= type_num_values
 
-        return DenseIntOrFPElementsAttr.from_list(type, data_values)
+        if isinstance(type.element_type, AnyFloat):
+            new_type = cast(RankedStructure[AnyFloat], type)
+            return DenseIntOrFPElementsAttr.create_dense_float(new_type, data_values)
+        else:
+            new_type = cast(RankedStructure[IntegerType | IndexType], type)
+            new_data = cast(Sequence[int], data_values)
+            return DenseIntOrFPElementsAttr.create_dense_int(new_type, new_data)
 
     def _parse_builtin_dense_attr(self) -> DenseIntOrFPElementsAttr:
         return self.parse_dense_int_or_fp_elements_attr(None)
diff --git a/xdsl/transforms/experimental/stencil_tensorize_z_dimension.py b/xdsl/transforms/experimental/stencil_tensorize_z_dimension.py
index 70dce5e66c..a2c03e4902 100644
--- a/xdsl/transforms/experimental/stencil_tensorize_z_dimension.py
+++ b/xdsl/transforms/experimental/stencil_tensorize_z_dimension.py
@@ -174,14 +174,14 @@ def match_and_rewrite(
             rewriter.replace_matched_op(
                 type_constructor(op.lhs, op.rhs, flags=None, result_type=op.lhs.type)
             )
-        elif is_tensor(op.lhs.type) and is_scalar(op.rhs.type):
+        elif isa(op.lhs.type, TensorType[AnyFloat]) and is_scalar(op.rhs.type):
             new_rhs = ArithOpTensorize._rewrite_scalar_operand(
                 op.rhs, op.lhs.type, op, rewriter
             )
             rewriter.replace_matched_op(
                 type_constructor(op.lhs, new_rhs, flags=None, result_type=op.lhs.type)
             )
-        elif is_scalar(op.lhs.type) and is_tensor(op.rhs.type):
+        elif is_scalar(op.lhs.type) and isa(op.rhs.type, TensorType[AnyFloat]):
             new_lhs = ArithOpTensorize._rewrite_scalar_operand(
                 op.lhs, op.rhs.type, op, rewriter
             )
@@ -192,7 +192,7 @@ def match_and_rewrite(
     @staticmethod
     def _rewrite_scalar_operand(
         scalar_op: SSAValue,
-        dest_typ: TensorType[IndexType | IntegerType | AnyFloat],
+        dest_typ: TensorType[AnyFloat],
         op: FloatingPointLikeBinaryOperation,
         rewriter: PatternRewriter,
     ) -> SSAValue:
@@ -205,7 +205,7 @@ def _rewrite_scalar_operand(
             assert isinstance(float_attr := scalar_op.op.value, FloatAttr)
             scalar_value = float_attr.value.data
             tens_const = ConstantOp(
-                DenseIntOrFPElementsAttr.from_list(dest_typ, [scalar_value])
+                DenseIntOrFPElementsAttr.create_dense_float(dest_typ, scalar_value)
             )
             rewriter.insert_op(tens_const, InsertPoint.before(scalar_op.op))
             return tens_const.result
diff --git a/xdsl/transforms/printf_to_llvm.py b/xdsl/transforms/printf_to_llvm.py
index a72690975f..498483245c 100644
--- a/xdsl/transforms/printf_to_llvm.py
+++ b/xdsl/transforms/printf_to_llvm.py
@@ -103,7 +103,7 @@ def _construct_global(self, val: str):
             _key_from_str(val),
             constant=True,
             linkage="internal",
-            value=builtin.DenseIntOrFPElementsAttr.from_list(t_type, data),
+            value=builtin.DenseIntOrFPElementsAttr([t_type, builtin.BytesAttr(data)]),
         )
 
     @op_type_rewrite_pattern


Reviews:
user: login: alexarice
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-13T15:04:33Z
user: login: alexarice
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-13T15:04:56Z
user: login: superlopuh
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-13T15:15:33Z
user: login: AntonLydike
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-13T16:38:27Z
user: login: AntonLydike
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-13T16:39:03Z
user: login: math-fehr
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-13T21:09:04Z
user: login: n-io
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-14T08:41:07Z

Review comments:
diff_hunk: @@ -242,7 +242,7 @@
     "\n",
     "        assert isa(op.res.type, toy.TensorTypeF64)\n",
     "\n",
-    "        new_value = DenseIntOrFPElementsAttr.from_list(\n",
+    "        new_value = DenseIntOrFPElementsAttr.create_dense_float(\n",
path: docs/Toy/Toy_Ch3.ipynb
user: login: alexarice
body: Might need to check that the notebooks still make sense
created_at: 2025-05-13T15:04:33Z
author_association: COLLABORATOR
diff_hunk: @@ -103,7 +103,7 @@ def _construct_global(self, val: str):
             _key_from_str(val),
             constant=True,
             linkage="internal",
-            value=builtin.DenseIntOrFPElementsAttr.from_list(t_type, data),
+            value=builtin.DenseIntOrFPElementsAttr([t_type, builtin.BytesAttr(data)]),
path: xdsl/transforms/printf_to_llvm.py
user: login: alexarice
body: @AntonLydike could you check that this is reasonable or suggest a fix if it is not
created_at: 2025-05-13T15:04:56Z
author_association: COLLABORATOR
diff_hunk: @@ -103,7 +103,7 @@ def _construct_global(self, val: str):
             _key_from_str(val),
             constant=True,
             linkage="internal",
-            value=builtin.DenseIntOrFPElementsAttr.from_list(t_type, data),
+            value=builtin.DenseIntOrFPElementsAttr([t_type, builtin.BytesAttr(data)]),
path: xdsl/transforms/printf_to_llvm.py
user: login: AntonLydike
body: If tests pass then it's good enough for me!
created_at: 2025-05-13T16:38:26Z
author_association: COLLABORATOR

PR comments:
user: login: review-notebook-app[bot]
created_at: 2025-05-13T15:04:07Z
body: Check out this pull request on&nbsp; <a href="https://app.reviewnb.com/xdslproject/xdsl/pull/4389"><img align="absmiddle"  alt="ReviewNB" height="28" class="BotMessageButtonImage" src="https://raw.githubusercontent.com/ReviewNB/support/master/images/button_reviewnb.png"/></a> 

 See visual diffs & provide feedback on Jupyter Notebooks. 

---

 <i>Powered by <a href='https://www.reviewnb.com/?utm_source=gh'>ReviewNB</a></i>
author_association: NONE
user: login: codecov[bot]
created_at: 2025-05-13T15:10:27Z
body: ## [Codecov](https://app.codecov.io/gh/xdslproject/xdsl/pull/4389?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdslproject) Report
:x: Patch coverage is `40.90909%` with `13 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 89.11%. Comparing base ([`2f63b3c`](https://app.codecov.io/gh/xdslproject/xdsl/commit/2f63b3c2ed03d4147d686f9064e02640e704330e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdslproject)) to head ([`afa33f9`](https://app.codecov.io/gh/xdslproject/xdsl/commit/afa33f962bc90ae183366c2c1b259c2f2cd2c596?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdslproject)).
:warning: Report is 560 commits behind head on main.

| [Files with missing lines](https://app.codecov.io/gh/xdslproject/xdsl/pull/4389?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdslproject) | Patch % | Lines |
|---|---|---|
| [xdsl/dialects/builtin.py](https://app.codecov.io/gh/xdslproject/xdsl/pull/4389?src=pr&el=tree&filepath=xdsl%2Fdialects%2Fbuiltin.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdslproject#diff-eGRzbC9kaWFsZWN0cy9idWlsdGluLnB5) | 15.38% | [11 Missing :warning: ](https://app.codecov.io/gh/xdslproject/xdsl/pull/4389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdslproject) |
| [...orms/experimental/stencil\_tensorize\_z\_dimension.py](https://app.codecov.io/gh/xdslproject/xdsl/pull/4389?src=pr&el=tree&filepath=xdsl%2Ftransforms%2Fexperimental%2Fstencil_tensorize_z_dimension.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdslproject#diff-eGRzbC90cmFuc2Zvcm1zL2V4cGVyaW1lbnRhbC9zdGVuY2lsX3RlbnNvcml6ZV96X2RpbWVuc2lvbi5weQ==) | 0.00% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/xdslproject/xdsl/pull/4389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdslproject) |

<details><summary>Additional details and impacted files</summary>



```diff
@@            Coverage Diff             @@
##             main    #4389      +/-   ##
==========================================
- Coverage   89.15%   89.11%   -0.05%     
==========================================
  Files         335      335              
  Lines       45509    45523      +14     
  Branches     5596     5600       +4     
==========================================
- Hits        40574    40568       -6     
- Misses       3537     3556      +19     
- Partials     1398     1399       +1     
```
</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/xdslproject/xdsl/pull/4389?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdslproject).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdslproject).
<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
author_association: NONE