From 0034f32d6d85d7f21cf04c82083860cdb2fe1ddb Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Mon, 26 Sep 2022 19:08:01 +0100 Subject: Update MLIR files and include LLVM directory --- test/python/lit.local.cfg | 4 ++++ test/python/smoketest.py | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/python/lit.local.cfg create mode 100644 test/python/smoketest.py (limited to 'test/python') diff --git a/test/python/lit.local.cfg b/test/python/lit.local.cfg new file mode 100644 index 0000000..b70b9d7 --- /dev/null +++ b/test/python/lit.local.cfg @@ -0,0 +1,4 @@ +config.suffixes.add('.py') + +if not config.enable_bindings_python: + config.unsupported = True diff --git a/test/python/smoketest.py b/test/python/smoketest.py new file mode 100644 index 0000000..0d8f41c --- /dev/null +++ b/test/python/smoketest.py @@ -0,0 +1,17 @@ +# RUN: %python %s | FileCheck %s + +from mlir_standalone.ir import * +from mlir_standalone.dialects import ( + builtin as builtin_d, + standalone as standalone_d +) + +with Context(): + standalone_d.register_dialect() + module = Module.parse(""" + %0 = arith.constant 2 : i32 + %1 = standalone.foo %0 : i32 + """) + # CHECK: %[[C:.*]] = arith.constant 2 : i32 + # CHECK: standalone.foo %[[C]] : i32 + print(str(module)) -- cgit