[Mlir-commits] [mlir] 030e315 - [mlir][linalg][transform][python] Verify modules in mix-in tests.
Ingo Müller
llvmlistbot at llvm.org
Mon Aug 14 06:38:03 PDT 2023
Author: Ingo Müller
Date: 2023-08-14T13:37:57Z
New Revision: 030e315ee771e9da0b6cf40abc5c3e14e84c3954
URL: https://github.com/llvm/llvm-project/commit/030e315ee771e9da0b6cf40abc5c3e14e84c3954
DIFF: https://github.com/llvm/llvm-project/commit/030e315ee771e9da0b6cf40abc5c3e14e84c3954.diff
LOG: [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
Added:
Modified:
mlir/test/python/dialects/transform_structured_ext.py
Removed:
################################################################################
diff --git a/mlir/test/python/dialects/transform_structured_ext.py b/mlir/test/python/dialects/transform_structured_ext.py
index 1da55edf777e00..cab4d2a03359cc 100644
--- a/mlir/test/python/dialects/transform_structured_ext.py
+++ b/mlir/test/python/dialects/transform_structured_ext.py
@@ -13,6 +13,7 @@ def run(f):
with InsertionPoint(module.body):
print("\nTEST:", f.__name__)
f()
+ module.operation.verify()
print(module)
return f
More information about the Mlir-commits
mailing list