Files
clang-p2996/mlir/examples/standalone/test/python/smoketest.py
Maksim Levental 61bf308cf2 Revert "[mlir python] Add nanobind support for standalone dialects." (#118517)
Reverts llvm/llvm-project#117922 because deps aren't met on some of the
post-commit build bots.
2024-12-03 09:26:33 -08:00

17 lines
436 B
Python

# 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))