11import ctypes
22
3- import mlir .execution_engine
4- import mlir .passmanager
5- from mlir import ir
6- from mlir .dialects import arith , func , linalg , sparse_tensor , tensor
3+ import mlir_finch .execution_engine
4+ import mlir_finch .passmanager
5+ from mlir_finch import ir
6+ from mlir_finch .dialects import arith , func , linalg , sparse_tensor , tensor
77
88import numpy as np
99
@@ -67,7 +67,7 @@ def add(a, b):
6767 if DEBUG :
6868 (CWD / "add_module_opt.mlir" ).write_text (str (module ))
6969
70- return mlir .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = [MLIR_C_RUNNER_UTILS ])
70+ return mlir_finch .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = [MLIR_C_RUNNER_UTILS ])
7171
7272
7373@fn_cache
@@ -92,7 +92,7 @@ def reshape(a, shape):
9292 if DEBUG :
9393 (CWD / "reshape_module_opt.mlir" ).write_text (str (module ))
9494
95- return mlir .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = [MLIR_C_RUNNER_UTILS ])
95+ return mlir_finch .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = [MLIR_C_RUNNER_UTILS ])
9696
9797
9898@fn_cache
@@ -120,7 +120,7 @@ def broadcast_to(in_tensor):
120120 if DEBUG :
121121 (CWD / "broadcast_to_module_opt.mlir" ).write_text (str (module ))
122122
123- return mlir .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = [MLIR_C_RUNNER_UTILS ])
123+ return mlir_finch .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = [MLIR_C_RUNNER_UTILS ])
124124
125125
126126def add (x1 : Tensor , x2 : Tensor ) -> Tensor :
0 commit comments