Skip to content

Commit e8d7612

Browse files
committed
Merge branch 'main' into xiaohui/vectorization
2 parents 57bec50 + 5fe9500 commit e8d7612

40 files changed

+2607
-120
lines changed

.github/workflows/clang-tidy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Install OpenMP
17-
run: "sudo apt install -y libomp-dev"
17+
run: "sudo apt install -y libomp-dev opencl-c-headers"
1818

1919
- name: Fetch sources
2020
uses: actions/checkout@v4

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,15 @@ get_property(GC_TOOLS GLOBAL PROPERTY GC_TOOLS)
9898
get_property(GC_MLIR_LIBS GLOBAL PROPERTY GC_MLIR_LIBS)
9999
get_property(GC_PASS_LIBS GLOBAL PROPERTY GC_PASS_LIBS)
100100
get_property(GC_DIALECT_LIBS GLOBAL PROPERTY GC_DIALECT_LIBS)
101+
get_property(IMEX_LIBS GLOBAL PROPERTY IMEX_LIBS)
102+
101103
install(TARGETS
102104
GcInterface
103105
${GC_TOOLS}
104106
${GC_MLIR_LIBS}
105107
${GC_PASS_LIBS}
106108
${GC_DIALECT_LIBS}
109+
${IMEX_LIBS}
107110
EXPORT ${PROJECT_NAME}Targets
108111
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
109112
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
[<img src="https://scan.coverity.com/projects/30281/badge.svg">](https://scan.coverity.com/projects/intel-graph-compiler)
22

33
# Graph Compiler
4-
Graph Compiler is an end-to-end, MLIR-based compiler designed to enhance the performance of deep learning workloads. It accepts computation graphs from the frontend, applies domain-specific optimizations and transformations, generates code, and manages runtime execution.
5-
6-
The current frontend for Graph Compiler is [oneDNN Graph API](https://oneapi-src.github.io/oneDNN/graph_extension.html).
4+
Graph Compiler is an end-to-end, MLIR-based compiler designed to enhance the performance of deep learning workloads. It accepts computation graphs from the frontend (primarily linalg on tensors), applies domain-specific optimizations and transformations, generates code, and manages runtime execution.
75

86
## Build instructions
97

cmake/functions.cmake

+33-1
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,36 @@ function(gc_add_mlir_dialect_library name)
117117
if(GcInterface IN_LIST ARGN)
118118
target_link_libraries(obj.${name} PUBLIC GcInterface)
119119
endif()
120-
endfunction()
120+
endfunction()
121+
122+
macro(gc_add_mlir_tool name)
123+
# the dependency list copied from mlir/tools/mlir-cpu-runner/CMakeLists.txt of upstream
124+
if(NOT DEFINED LLVM_LINK_COMPONENTS)
125+
set(LLVM_LINK_COMPONENTS
126+
Core
127+
Support
128+
nativecodegen
129+
native
130+
)
131+
endif()
132+
if(NOT DEFINED MLIR_LINK_COMPONENTS)
133+
gc_set_mlir_link_components(MLIR_LINK_COMPONENTS
134+
MLIRAnalysis
135+
MLIRBuiltinToLLVMIRTranslation
136+
MLIRExecutionEngine
137+
MLIRIR
138+
MLIRJitRunner
139+
MLIRLLVMDialect
140+
MLIRLLVMToLLVMIRTranslation
141+
MLIRToLLVMIRTranslationRegistration
142+
MLIRParser
143+
MLIRTargetLLVMIRExport
144+
MLIRSupport
145+
)
146+
endif()
147+
add_mlir_tool(${ARGV})
148+
#LLVM_LINK_COMPONENTS is processed by LLVM cmake in add_llvm_executable
149+
target_link_libraries(${name} PRIVATE GcInterface ${MLIR_LINK_COMPONENTS})
150+
llvm_update_compile_flags(${name})
151+
set_property(GLOBAL APPEND PROPERTY GC_TOOLS ${name})
152+
endmacro()

cmake/imex-version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8209807be6148d81fda6f439a01b77696986dd3e
1+
25123cc3692fdbcf837510f39de47ff353d482fc

cmake/imex.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ if (NOT DEFINED IMEX_INCLUDES)
2424
${imex_SOURCE_DIR}/src
2525
)
2626
set_property(GLOBAL PROPERTY IMEX_INCLUDES ${IMEX_INCLUDES})
27+
target_compile_options(GcInterface INTERFACE -DGC_USE_IMEX)
2728
endif ()

0 commit comments

Comments
 (0)