Skip to content

Commit b768b8a

Browse files
[mlir][ROCDL] Fix Python bindings test for WMMA refactoring
Update the Python test to match the new WMMA API where operands are passed as separate positional arguments and attributes (like opsel) are passed as keyword arguments with boolean values. Changes: - Changed from list-style arguments to positional arguments - Changed opsel from MLIR Value operand to Python bool attribute - Removed unnecessary false constant creation This fixes the CI test failure where the Python bindings were expecting the old API signature.
1 parent 76928f0 commit b768b8a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

mlir/test/python/dialects/rocdl.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ def testSmoke():
2929
a_frag = arith.constant(v16f32, f32_array)
3030
b_frag = arith.constant(v16f32, f32_array)
3131
c_frag = arith.constant(v16f32, f32_array)
32-
false = arith.constant(T.bool(), False)
3332

34-
c_frag = rocdl.wmma_f16_16x16x16_f16(v16f32, [a_frag, b_frag, c_frag, false])
35-
# CHECK: %{{.*}} = rocdl.wmma.f16.16x16x16.f16
33+
c_frag = rocdl.wmma_f16_16x16x16_f16(v16f32, a_frag, b_frag, c_frag, opsel=False)
34+
# CHECK: %{{.*}} = "rocdl.wmma.f16.16x16x16.f16"
3635
print(c_frag)
3736
assert isinstance(c_frag, OpView)
38-
# CHECK: Value(%{{.*}} = rocdl.wmma.f16.16x16x16.f16
39-
c_frag = rocdl.wmma_f16_16x16x16_f16_(v16f32, [a_frag, b_frag, c_frag, false])
37+
# CHECK: Value(%{{.*}} = "rocdl.wmma.f16.16x16x16.f16"
38+
c_frag = rocdl.wmma_f16_16x16x16_f16_(v16f32, a_frag, b_frag, c_frag, opsel=False)
4039
print(c_frag)
4140
assert isinstance(c_frag, Value)

0 commit comments

Comments
 (0)