CMakeLists.txt 1.4 KB
Newer Older
W
Wu Yi 已提交
1
include(operators)
2
if(WITH_UNITY_BUILD)
3 4
  # Load Unity Build rules for operators in paddle/fluid/operators/controlflow.
  include(unity_build_rule.cmake)
5
endif()
Z
zhang wenhui 已提交
6 7
register_operators(EXCLUDES conditional_block_op DEPS naive_executor)

8 9 10
cc_library(
  conditional_block_op
  SRCS conditional_block_op.cc
11
  DEPS standalone_executor executor)
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
cc_library(
  op_variant
  SRCS op_variant.cc
  DEPS operator proto_desc)
cc_library(
  conditional_block_op_helper
  SRCS conditional_block_op_helper.cc
  DEPS operator op_variant conditional_block_op)
cc_library(
  recurrent_op_helper
  SRCS recurrent_op_helper.cc
  DEPS operator op_variant recurrent_op)
cc_library(
  while_op_helper
  SRCS while_op_helper.cc
  DEPS operator op_variant)
W
Wu Yi 已提交
28

29 30 31
cc_test(
  conditional_block_op_test
  SRCS conditional_block_op_test.cc
32
  DEPS conditional_block_op standalone_executor executor)
33

34
if(WITH_UNITY_BUILD)
35
  target_link_libraries(paddle_operators_controlflow_unity conditional_block_op)
36
else()
37
  target_link_libraries(conditional_block_infer_op conditional_block_op)
38
endif()
Z
Zeng Jinle 已提交
39

40 41 42 43 44 45 46 47 48 49 50 51
file(
  APPEND ${pybind_file}
  "USE_OP_ITSELF(less_than);\nUSE_OP_ITSELF(equal_all);\nUSE_NO_KERNEL_OP(read_from_array);\n"
)
file(
  APPEND ${pybind_file}
  "USE_OP_ITSELF(logical_and);\nUSE_OP_ITSELF(logical_or);\nUSE_OP_ITSELF(logical_xor);\nUSE_OP_ITSELF(logical_not);\n"
)
file(
  APPEND ${pybind_file}
  "USE_OP_ITSELF(bitwise_and);\nUSE_OP_ITSELF(bitwise_or);\nUSE_OP_ITSELF(bitwise_xor);\nUSE_OP_ITSELF(bitwise_not);\n"
)