File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -120,4 +120,5 @@ add_mlir_python_modules(GcPythonModules
120
120
GcPythonCAPI
121
121
)
122
122
123
+ add_dependencies (GcPythonModules GcCpuRuntime )
123
124
configure_file (config.py.in ${MLIR_BINARY_DIR} /python_packages/gc_mlir_core/gc_mlir/config.py @ONLY )
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import sys
4
4
llvm_obj_root = "@LLVM_BINARY_DIR@"
5
5
llvm_lib_dir = "@LLVM_LIBRARY_DIR@"
6
6
shlib_ext = "@LTDL_SHLIB_EXT@"
7
+ gc_lib_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"
8
+
7
9
8
10
if sys.platform.startswith("win32"):
9
11
mlir_runner_utils_dir = os.path.normpath(os.path.join(llvm_obj_root, "bin"))
@@ -20,3 +22,7 @@ MLIR_C_RUNNER_UTILS = os.path.normpath(
20
22
MLIR_RUNNER_UTILS = os.path.normpath(
21
23
os.path.join(mlir_runner_utils_dir, shlib_prefix + "mlir_runner_utils" + shlib_ext)
22
24
)
25
+
26
+ GC_CPU_RUNTIME = os.path.normpath(
27
+ os.path.join(gc_lib_dir, shlib_prefix + "GcCpuRuntime" + shlib_ext)
28
+ )
Original file line number Diff line number Diff line change 6
6
#
7
7
# ===-----------------------------------------------------------------------===#
8
8
9
- from gc_mlir import execution_engine
10
- from gc_mlir import ir
11
- from gc_mlir import passmanager
12
- from gc_mlir .config import MLIR_C_RUNNER_UTILS , MLIR_RUNNER_UTILS
9
+ from gc_mlir import execution_engine , ir , passmanager
10
+ from gc_mlir .config import GC_CPU_RUNTIME , MLIR_C_RUNNER_UTILS , MLIR_RUNNER_UTILS
13
11
14
12
__all__ = [
15
13
"GraphCompiler" ,
@@ -22,7 +20,7 @@ def __init__(
22
20
pipeline : str = "any(gc-cpu-pipeline)" ,
23
21
opt_level : int = 3 ,
24
22
):
25
- self .shared_libs = [MLIR_C_RUNNER_UTILS , MLIR_RUNNER_UTILS ]
23
+ self .shared_libs = [MLIR_C_RUNNER_UTILS , MLIR_RUNNER_UTILS , GC_CPU_RUNTIME ]
26
24
self .pipeline = pipeline
27
25
self .opt_level = opt_level
28
26
You can’t perform that action at this time.
0 commit comments