[mlir] fix python test
authorAlex Zinenko <zinenko@google.com>
Thu, 19 Jan 2023 08:58:34 +0000 (08:58 +0000)
committerAlex Zinenko <zinenko@google.com>
Thu, 19 Jan 2023 08:58:34 +0000 (08:58 +0000)
It was using an incorrect attribute type, but the test was still passing
because of the value being present in the output.

mlir/python/mlir/dialects/_structured_transform_ops_ext.py
mlir/test/python/dialects/transform_structured_ext.py

index 5fd5cfe..2525ea3 100644 (file)
@@ -110,7 +110,7 @@ class InterchangeOp:
                loc=None,
                ip=None):
     pdl_operation_type = pdl.OperationType.get()
-    interchange_attr = _get_int_array_attr(iterator_interchange)
+    interchange_attr = _get_dense_int64_array_attr(iterator_interchange)
     super().__init__(
         pdl_operation_type,
         _get_op_result_or_value(target),
index 34c86a3..b88f746 100644 (file)
@@ -44,9 +44,7 @@ def testInterchange():
   with InsertionPoint(sequence.body):
     structured.InterchangeOp(
         sequence.bodyTarget,
-        iterator_interchange=[
-            IntegerAttr.get(IntegerType.get_signless(64), 1), 0
-        ])
+        iterator_interchange=[1, 0])
     transform.YieldOp()
   # CHECK-LABEL: TEST: testInterchange
   # CHECK: transform.sequence