CMakeLists.txt 2.2 KB
Newer Older
1 2 3 4 5 6 7 8 9
pass_library(
  build_cinn_pass
  base
  DEPS
  subgraph_detector
  cinn_compiler
  errors
  enforce)

10 11 12
cc_library(
  cinn_cache_key
  SRCS cinn_cache_key.cc
R
Ruibiao Chen 已提交
13
  DEPS graph graph_helper lod_tensor proto_desc)
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
cc_library(
  transform_desc
  SRCS transform_desc.cc
  DEPS proto_desc cinn)
cc_library(
  transform_type
  SRCS transform_type.cc
  DEPS errors enforce cinn)
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
       cinn_launch_context)
36

37 38 39 40 41
if(WITH_TESTING)
  cc_test(
    cinn_lib_test
    SRCS cinn_lib_test.cc
    DEPS cinn)
H
Huihuang Zheng 已提交
42
  set_tests_properties(cinn_lib_test PROPERTIES LABELS "RUN_TYPE=CINN")
43

44 45 46 47
  cc_test(
    cinn_cache_key_test
    SRCS cinn_cache_key_test.cc
    DEPS cinn_cache_key)
H
Huihuang Zheng 已提交
48
  set_tests_properties(cinn_cache_key_test PROPERTIES LABELS "RUN_TYPE=CINN")
49

50 51 52 53 54
  cc_test(
    build_cinn_pass_test
    SRCS build_cinn_pass_test.cc
    DEPS build_cinn_pass cinn_compiler op_registry mul_op activation_op
         elementwise_add_op)
H
Huihuang Zheng 已提交
55
  set_tests_properties(build_cinn_pass_test PROPERTIES LABELS "RUN_TYPE=CINN")
56

57 58 59 60
  cc_test(
    transform_desc_test
    SRCS transform_desc_test.cc
    DEPS transform_desc)
H
Huihuang Zheng 已提交
61
  set_tests_properties(transform_desc_test PROPERTIES LABELS "RUN_TYPE=CINN")
62

63 64 65 66
  cc_test(
    transform_type_test
    SRCS transform_type_test.cc
    DEPS transform_type)
67 68
  set_tests_properties(transform_type_test PROPERTIES LABELS "RUN_TYPE=CINN")

69 70 71 72 73 74
  cc_test(
    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")
75

76 77 78 79 80 81 82 83 84 85 86 87
  cc_test(
    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)
H
Huihuang Zheng 已提交
88 89
  set_tests_properties(cinn_compiler_test PROPERTIES LABELS "RUN_TYPE=CINN")
endif()