mirror of https://github.com/llvm/torch-mlir
19 lines
382 B
Python
19 lines
382 B
Python
|
# 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
|