CMakeLists.txt 3.0 KB
Newer Older
1 2 3 4
pass_library(
  build_cinn_pass
  base
  DEPS
S
sunli 已提交
5
  cinn_subgraph_detector
6 7
  subgraph_detector
  cinn_compiler
8
  phi
9 10
  enforce)

11 12
pass_library(cinn_zero_tensor_trick_pass base)

13 14 15 16 17 18 19
cc_library(
  transform_desc
  SRCS transform_desc.cc
  DEPS proto_desc cinn)
cc_library(
  transform_type
  SRCS transform_type.cc
20
  DEPS phi enforce cinn)
21 22 23 24 25 26 27 28
cc_library(
  cinn_cache_key
  SRCS cinn_cache_key.cc
  DEPS graph graph_helper lod_tensor proto_desc transform_type)
cc_library(
  cinn_subgraph_detector
  SRCS cinn_subgraph_detector.cc
  DEPS graph graph_helper subgraph_detector lod_tensor proto_desc)
29 30 31 32 33 34 35 36 37 38 39 40 41
cc_library(
  cinn_graph_symbolization
  SRCS cinn_graph_symbolization.cc
  DEPS lod_tensor graph transform_desc cinn)
cc_library(
  cinn_compiler
  SRCS cinn_compiler.cc
  DEPS framework_proto
       graph
       lod_tensor
       cinn_cache_key
       cinn_graph_symbolization
       cinn
R
risemeup1 已提交
42 43 44
       cinn_launch_context
       python
       pybind)
45

46
if(WITH_TESTING)
47 48
  # cc_test_old(cinn_lib_test SRCS cinn_lib_test.cc DEPS cinn)
  # set_tests_properties(cinn_lib_test PROPERTIES LABELS "RUN_TYPE=CINN")
49

50 51
  cc_test_old(cinn_cache_key_test SRCS cinn_cache_key_test.cc DEPS
              cinn_cache_key)
H
Huihuang Zheng 已提交
52
  set_tests_properties(cinn_cache_key_test PROPERTIES LABELS "RUN_TYPE=CINN")
53

54
  cc_test_old(
55
    build_cinn_pass_test
56 57 58 59 60 61 62 63
    SRCS
    build_cinn_pass_test.cc
    DEPS
    build_cinn_pass
    cinn_compiler
    op_registry
    mul_op
    activation_op
64
    elementwise_add_op
65 66
    generated_op
    generated_static_op)
H
Huihuang Zheng 已提交
67
  set_tests_properties(build_cinn_pass_test PROPERTIES LABELS "RUN_TYPE=CINN")
68
  target_link_libraries(build_cinn_pass_test ${PYTHON_LIBRARIES})
69 70 71 72 73 74 75 76 77 78 79 80 81 82

  cc_test_old(
    cinn_zero_tensor_trick_pass_test
    SRCS
    cinn_zero_tensor_trick_pass_test.cc
    DEPS
    build_cinn_pass
    cinn_compiler
    op_registry
    elementwise_add_op
    generated_op)
  set_tests_properties(cinn_zero_tensor_trick_pass_test
                       PROPERTIES LABELS "RUN_TYPE=CINN")
  target_link_libraries(cinn_zero_tensor_trick_pass_test ${PYTHON_LIBRARIES})
83

84 85
  cc_test_old(transform_desc_test SRCS transform_desc_test.cc DEPS
              transform_desc)
H
Huihuang Zheng 已提交
86
  set_tests_properties(transform_desc_test PROPERTIES LABELS "RUN_TYPE=CINN")
87

88 89
  cc_test_old(transform_type_test SRCS transform_type_test.cc DEPS
              transform_type)
90 91
  set_tests_properties(transform_type_test PROPERTIES LABELS "RUN_TYPE=CINN")

92 93 94 95
  # cc_test_old(cinn_graph_symbolization_test SRCS
  #            cinn_graph_symbolization_test.cc DEPS cinn_graph_symbolization)
  # set_tests_properties(cinn_graph_symbolization_test PROPERTIES LABELS
  #                                                              "RUN_TYPE=CINN")
96

97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
  # cc_test_old(
  #   cinn_compiler_test
  #   SRCS
  #   cinn_compiler_test.cc
  #   DEPS
  #   cinn_compiler
  #   place
  #   proto_desc
  #   graph_viz_pass
  #   build_cinn_pass
  #   cinn
  #   mul_op
  #   activation_op
  #   elementwise_add_op
  #   generated_op)
  # set_tests_properties(cinn_compiler_test PROPERTIES LABELS "RUN_TYPE=CINN")
H
Huihuang Zheng 已提交
113
endif()