CMakeLists.txt 2.0 KB
Newer Older
1
add_subdirectory(engine)
2 3 4 5 6 7 8
proto_library(paddle_jit_property_proto SRCS property.proto)

cc_library(
  jit_property
  SRCS property.cc
  DEPS paddle_jit_property_proto tensor)

9 10 11
cc_library(
  jit_serializer
  SRCS serializer.cc
12
  DEPS lod_tensor device_context jit_property)
13

14
cc_library(
15 16 17 18 19 20 21 22
  jit_function_utils
  SRCS function_utils.cc
  DEPS lod_tensor scope proto_desc)

cc_library(
  jit_serializer_utils
  SRCS serializer_utils.cc
  DEPS proto_desc)
23 24 25 26 27 28

cc_library(
  jit_compilation_unit
  SRCS compilation_unit.cc
  DEPS proto_desc executor parallel_executor executor_cache)

29 30 31 32 33
cc_library(
  jit_function_schema
  SRCS function_schema.cc
  DEPS jit_function_utils)

34 35 36
cc_library(
  jit_function
  SRCS function.cc
37 38
  DEPS jit_function_utils jit_executor_engine jit_pe_engine
       jit_interpreter_engine)
39

40 41 42
cc_library(
  jit_layer
  SRCS layer.cc
43 44 45 46 47
  DEPS jit_serializer
       jit_function_utils
       jit_serializer_utils
       jit_compilation_unit
       jit_function_schema
48 49
       jit_executor_engine
       jit_pe_engine
50
       jit_interpreter_engine
51
       jit_function)
52

T
tianshuo78520a 已提交
53
if(WITH_TESTING AND NOT WIN32)
54 55
  add_custom_target(
    jit_download_program
56
    COMMAND
D
danleifeng 已提交
57
      wget -nc -q --no-check-certificate
58
      https://paddle-ci.gz.bcebos.com/dy2st/multi_program_load_with_property.tar.gz
59 60
    COMMAND tar zxf multi_program_load_with_property.tar.gz
    WORKING_DIRECTORY "${CC_TESTS_DIR}")
61 62
  set(JIT_DEPS
      phi
63
      phi_api
64 65 66 67 68 69 70
      elementwise_add_op
      matmul_v2_op
      activation_op
      reduce_mean_op
      feed_op
      fetch_op
      scale_op
71
      transfer_layout_op
72
      jit_layer)
73 74 75 76
  cc_test(
    layer_test
    SRCS layer_test.cc
    DEPS ${JIT_DEPS})
77
  # add_dependencies(layer_test jit_download_program)
78 79 80 81 82

  cc_test(
    layer_test_new
    SRCS layer_test.cc
    DEPS ${JIT_DEPS})
83 84 85
  # add_dependencies(layer_test_new jit_download_program)
  # set_tests_properties(layer_test_new PROPERTIES ENVIRONMENT
  #                                                "FLAGS_jit_engine_type=New")
86
endif()