Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 28e6531

Browse files
Add tc_core_cpu library
1 parent cb8282e commit 28e6531

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

src/core/CMakeLists.txt

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ add_library(
1414
halide2isl.cc
1515
halide_utils.cc
1616

17-
cpu/cpu_tc_executor.cc
18-
19-
polyhedral/codegen_cuda.cc
20-
polyhedral/codegen_llvm.cc
21-
polyhedral/llvm_jit.cc
17+
polyhedral/codegen.cc
2218
polyhedral/mapped_scop.cc
2319
polyhedral/mapping_types.cc
2420
polyhedral/memory_promotion.cc
@@ -53,6 +49,35 @@ install(
5349
DESTINATION lib
5450
)
5551

52+
add_library(
53+
tc_core_cpu
54+
55+
SHARED
56+
57+
cpu/cpu_tc_executor.cc
58+
59+
polyhedral/codegen_llvm.cc
60+
polyhedral/llvm_jit.cc
61+
)
62+
target_include_directories(tc_core_cpu PUBLIC ${PROJECT_SOURCE_DIR}/include ${LLVM_INCLUDE_DIRS})
63+
target_link_libraries(
64+
tc_core_cpu
65+
66+
${HALIDE_LIBRARIES}
67+
${ISL_LIBRARIES}
68+
-lLLVM
69+
70+
tc_lang
71+
tc_version
72+
tc_proto
73+
)
74+
install(
75+
TARGETS
76+
tc_core_cpu
77+
78+
DESTINATION lib
79+
)
80+
5681
if (WITH_CUDA)
5782
find_library(CUDA_NVRTC_LIBRARIES nvrtc
5883
PATHS ${CUDA_TOOLKIT_ROOT_DIR}
@@ -67,6 +92,8 @@ if (WITH_CUDA)
6792
cuda/cuda_compilation_cache.cc
6893
cuda/cuda_rtc.cc
6994
cuda/cuda_tc_executor.cc
95+
96+
polyhedral/codegen_cuda.cc
7097
)
7198
target_include_directories(tc_core_cuda PUBLIC ${PROJECT_SOURCE_DIR}/include ${LLVM_INCLUDE_DIRS})
7299
target_link_libraries(

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ set(CORE_TEST_FILES
9797
foreach(i ${CORE_TEST_FILES})
9898
add_executable(${i} ${i}.cc)
9999
add_test(${i} ${i})
100-
target_link_libraries(${i} ${GOOGLE_LIBS} tc_core tc_lang)
100+
target_link_libraries(${i} ${GOOGLE_LIBS} tc_core tc_core_cpu tc_lang)
101101
# target_compile_options(${i} PUBLIC -fsanitize=address)
102102
# set(CMAKE_EXE_LINKER_FLAGS -fsanitize=address)
103103
endforeach()

0 commit comments

Comments
 (0)