torch-mlir/pytest/Compiler/calls.py

19 lines
382 B
Python
Raw Normal View History

# RUN: %PYTHON %s | npcomp-opt -split-input-file | FileCheck %s --dump-input=fail
from npcomp.compiler.frontend import *
def import_global(f):
fe = ImportFrontend()
fe.import_global_function(f)
print("// -----")
print(fe.ir_module.to_asm())
return f
# CHECK-LABEL: func @call_builtin_print
@import_global
def call_builtin_print():
#print("Hello World!")
return 1