99
1010from ._array import Array
1111from ._common import fn_cache
12- from ._core import CWD , DEBUG , MLIR_C_RUNNER_UTILS , ctx , pm
12+ from ._core import CWD , DEBUG , OPT_LEVEL , SHARED_LIBS , ctx , pm
1313from ._dtypes import DType , IeeeComplexFloatingDType , IeeeRealFloatingDType , IntegerDType
1414from .levels import _determine_format
1515
@@ -79,7 +79,7 @@ def add(a, b):
7979 if DEBUG :
8080 (CWD / "add_module_opt.mlir" ).write_text (str (module ))
8181
82- return mlir .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = [ MLIR_C_RUNNER_UTILS ] )
82+ return mlir .execution_engine .ExecutionEngine (module , opt_level = OPT_LEVEL , shared_libs = SHARED_LIBS )
8383
8484
8585@fn_cache
@@ -104,7 +104,7 @@ def reshape(a, shape):
104104 if DEBUG :
105105 (CWD / "reshape_module_opt.mlir" ).write_text (str (module ))
106106
107- return mlir .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = [ MLIR_C_RUNNER_UTILS ] )
107+ return mlir .execution_engine .ExecutionEngine (module , opt_level = OPT_LEVEL , shared_libs = SHARED_LIBS )
108108
109109
110110@fn_cache
@@ -130,7 +130,7 @@ def broadcast_to(in_tensor):
130130 if DEBUG :
131131 (CWD / "broadcast_to_module_opt.mlir" ).write_text (str (module ))
132132
133- return mlir .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = [ MLIR_C_RUNNER_UTILS ] )
133+ return mlir .execution_engine .ExecutionEngine (module , opt_level = OPT_LEVEL , shared_libs = SHARED_LIBS )
134134
135135
136136def add (x1 : Array , x2 : Array ) -> Array :
0 commit comments