2020-03-19 16:48:09 +08:00
|
|
|
add_subdirectory(Interface)
|
2020-03-20 22:40:51 +08:00
|
|
|
add_subdirectory(Dialect)
|
|
|
|
add_subdirectory(Conversion)
|
2020-03-19 16:48:09 +08:00
|
|
|
add_subdirectory(Transform)
|
|
|
|
add_subdirectory(Tool)
|
|
|
|
add_subdirectory(Builder)
|
|
|
|
add_subdirectory(Runtime)
|
2019-12-23 13:13:52 +08:00
|
|
|
|
2020-03-17 21:16:33 +08:00
|
|
|
add_executable(onnx-mlir main.cpp)
|
2020-03-19 15:03:37 +08:00
|
|
|
target_link_libraries(onnx-mlir
|
|
|
|
${MLIRLibs}
|
2020-03-20 22:40:51 +08:00
|
|
|
OMBuilder
|
|
|
|
OMKrnlOps
|
|
|
|
OMONNXOps
|
|
|
|
OMKrnlToAffine
|
|
|
|
OMKrnlToLLVM
|
|
|
|
OMShapeInference
|
|
|
|
OMONNXToKrnl
|
|
|
|
OMONNXRewrite
|
|
|
|
OMAttributePromotion
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
${CMAKE_DL_LIBS})
|
2020-03-19 15:03:37 +08:00
|
|
|
whole_archive_link_mlir(onnx-mlir
|
|
|
|
${MLIRWholeArchiveLibs})
|
|
|
|
|
2020-01-22 00:08:16 +08:00
|
|
|
find_package(ZLIB REQUIRED)
|
2020-03-17 21:16:33 +08:00
|
|
|
target_link_libraries(onnx-mlir ${ZLIB_LIBRARIES})
|
2019-12-21 14:58:23 +08:00
|
|
|
|
2020-03-21 00:04:22 +08:00
|
|
|
target_include_directories(onnx-mlir PRIVATE ${ONNX_MLIR_SRC_ROOT})
|
2020-03-17 21:16:33 +08:00
|
|
|
target_include_directories(onnx-mlir PRIVATE ${CMAKE_BINARY_DIR})
|
2020-03-21 00:04:22 +08:00
|
|
|
target_include_directories(onnx-mlir PRIVATE ${ONNX_MLIR_BIN_ROOT})
|
2019-11-12 10:31:56 +08:00
|
|
|
|
2020-03-17 21:16:33 +08:00
|
|
|
install(TARGETS onnx-mlir DESTINATION bin)
|