99
1010from ._array import Array
1111from ._common import fn_cache
12- from ._core import CWD , DEBUG , SHARED_LIBS , 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_finch .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = SHARED_LIBS )
82+ return mlir_finch .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_finch .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = SHARED_LIBS )
107+ return mlir_finch .execution_engine .ExecutionEngine (module , opt_level = OPT_LEVEL , shared_libs = SHARED_LIBS )
108108
109109
110110@fn_cache
@@ -132,7 +132,7 @@ def broadcast_to(in_tensor):
132132 if DEBUG :
133133 (CWD / "broadcast_to_module_opt.mlir" ).write_text (str (module ))
134134
135- return mlir_finch .execution_engine .ExecutionEngine (module , opt_level = 2 , shared_libs = SHARED_LIBS )
135+ return mlir_finch .execution_engine .ExecutionEngine (module , opt_level = OPT_LEVEL , shared_libs = SHARED_LIBS )
136136
137137
138138def add (x1 : Array , x2 : Array ) -> Array :
0 commit comments