CMakeLists.txt 1.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
set(eager_deps
    phi_api
    phi_dygraph_api
    hook_utils
    tensor_utils
    utils
    global_utils
    backward
    phi_tensor
    tracer
    layer
    autograd_meta
    eager_nan_inf_utils
    grad_node_info
    grad_tensor_holder
    accumulation_node
17 18
    custom_operator_node
    python)
19

20 21 22 23 24 25 26 27 28 29
set(fluid_deps
    tracer
    layer
    proto_desc
    operator
    op_registry
    variable_helper
    memcpy)
set(generated_deps final_dygraph_function final_dygraph_node dygraph_function
                   dygraph_node)
30

31
if(NOT ((NOT WITH_PYTHON) AND ON_INFER))
32 33
  message("Performing Eager Dygraph Auto Code Generation")
  add_subdirectory(auto_code_generator)
34 35
endif()

36
add_subdirectory(api)
37
add_subdirectory(accumulation)
38
add_subdirectory(custom_operator)
W
wanghuancoder 已提交
39
if(NOT ((NOT WITH_PYTHON) AND ON_INFER))
40 41 42 43 44
  add_subdirectory(pylayer)
  cc_library(
    grad_tensor_holder
    SRCS grad_tensor_holder.cc
    DEPS grad_node_info gradient_accumulator)
45
  add_dependencies(grad_tensor_holder eager_codegen)
46 47 48 49
  cc_library(
    backward
    SRCS backward.cc
    DEPS grad_tensor_holder utils autograd_meta grad_node_info switch_autotune)
W
wanghuancoder 已提交
50
endif()
51

52 53 54 55 56 57 58 59
cc_library(
  eager_nan_inf_utils
  SRCS nan_inf_utils.cc
  DEPS phi_tensor nan_inf_utils enforce)
cc_library(
  grad_node_info
  SRCS grad_node_info.cc
  DEPS phi_api phi_tensor)
60

61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
cc_library(
  autograd_meta
  SRCS autograd_meta.cc
  DEPS phi_api phi_tensor)
cc_library(
  utils
  SRCS utils.cc
  DEPS phi_api
       phi_tensor
       global_utils
       layer
       proto_desc
       operator
       op_registry
       variable_helper
       memcpy
       scale_op
       autograd_meta
       hook_utils)
80

81 82 83 84
cc_library(
  saved_tensors_hooks
  SRCS saved_tensors_hooks.cc
  DEPS hook_utils)
85
if(NOT ((NOT WITH_PYTHON) AND ON_INFER))
86
  add_subdirectory(tests)
87
endif()