[Mlir-commits] [mlir] [mlir][python] add type wrappers (PR #71218)
Maksim Levental
llvmlistbot at llvm.org
Mon Nov 13 10:38:09 PST 2023
================
@@ -772,3 +773,94 @@ def testCustomTypeTypeCaster():
print(t)
# CHECK: OperationType(!transform.op<"foo.bar">)
print(repr(t))
+
+
+# CHECK-LABEL: TEST: testTypeWrappers
+ at run
+def testTypeWrappers():
+ try:
+ from mlir.types import i32
+ except RuntimeError as e:
+ assert e.args[0].startswith(
+ "An MLIR function requires a Context but none was provided"
+ )
----------------
makslevental wrote:
This isn't a really a useful test - just a demo of what happens if you use the moduel incorrectly.
https://github.com/llvm/llvm-project/pull/71218
More information about the Mlir-commits
mailing list