CMakeLists.txt 878 字节
Newer Older
Y
Yan Chunwei 已提交
1 2 3 4
core_gather_headers()

gather_srcs(infrt_src SRCS
    dialect.cc
5
    init_dialects.cc
Y
Yan Chunwei 已提交
6 7 8 9 10 11
    tensor_shape.cc
    dense_tensor.cc
    mlir_loader.cc
    diagnostic_utils.cc
    pd_ops.cc
    )
12

Y
Yan Chunwei 已提交
13 14 15 16
mlir_tablegen_on(tensor_shape DIALECT ts)
mlir_tablegen_on(dense_tensor DIALECT dt)
mlir_tablegen_on(pd_op_base DIALECT pd)
mlir_tablegen_on(pd_ops)
17
mlir_tablegen_on(pd_extra_ops)
18

Y
Yan Chunwei 已提交
19 20 21 22
mlir_add_rewriter(rewrite)

# TODO(Superjomn) add a cmake function cc_executable to ecapsulate the following code
add_executable(infrtopt opt.cc)
23
target_link_libraries(infrtopt infrt)
Y
Yan Chunwei 已提交
24 25 26 27 28 29

add_executable(print-ir print_ir.cc)
target_link_libraries(print-ir infrt ${mlir_libs})
add_dependencies(print-ir pd_ops_inc)
cc_test_tiny(test_infrt_mlir_loader SRCS mlir_loader_test.cc DEPS infrt ${MLIR_IR_LIBS})

30
add_subdirectory(infrt)
31
add_subdirectory(tensorrt)
32

33 34
if (INFRT_WITH_PHI)
    add_subdirectory(phi)
35
endif()