Skip to content

Commit 030e315

Browse files
[mlir][linalg][transform][python] Verify modules in mix-in tests.
The tests of the mix-in classes of the Python bindings currently passed even if the ops constructed by the mix-ins under test failed to verify. This is because the assembled IR is still printed in generic form even if it does not verify, and the `CHECK` statements are formulated in such a lenient way that they also match that generic form. This patch adds explicit verification to the decorator that is used for all test functions. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D157790
1 parent 94f377d commit 030e315

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mlir/test/python/dialects/transform_structured_ext.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def run(f):
1313
with InsertionPoint(module.body):
1414
print("\nTEST:", f.__name__)
1515
f()
16+
module.operation.verify()
1617
print(module)
1718
return f
1819

0 commit comments

Comments
 (0)