CMakeLists.txt 1.1 KB
Newer Older
N
nhzlx 已提交
1
cc_library(subgraph_detector SRCS subgraph_detector.cc subgraph_util.cc DEPS proto_desc)
P
peizhilin 已提交
2 3 4
if(WITH_TESTING)
  add_dependencies(subgraph_detector gtest)
endif()
5

Y
Yan Chunwei 已提交
6
if (WITH_GPU AND TENSORRT_FOUND)
7 8 9 10 11 12 13 14 15 16
  cc_library(tensorrt_subgraph_pass SRCS tensorrt_subgraph_pass.cc DEPS subgraph_detector tensorrt_op_teller)

  set(analysis_deps ${analysis_deps}
          subgraph_detector tensorrt_subgraph_pass
          CACHE INTERNAL "")

  set(pass_file ${PADDLE_BINARY_DIR}/paddle/fluid/inference/api/paddle_inference_pass.h)
  file(APPEND ${pass_file} "USE_PASS(tensorrt_subgraph_pass);\n")
  set(INFER_IR_PASSES ${INFER_IR_PASSES} tensorrt_subgraph_pass CACHE INTERNAL "")
endif()
17

N
nhzlx 已提交
18
if (ANAKIN_FOUND) 
19 20 21 22 23 24 25 26 27 28
  cc_library(anakin_subgraph_pass SRCS anakin_subgraph_pass.cc DEPS subgraph_detector anakin_op_teller)

  set(analysis_deps ${analysis_deps}
          subgraph_detector anakin_subgraph_pass
          CACHE INTERNAL "")

  set(pass_file ${PADDLE_BINARY_DIR}/paddle/fluid/inference/api/paddle_inference_pass.h)
  file(APPEND ${pass_file} "USE_PASS(anakin_subgraph_pass);\n")
  set(INFER_IR_PASSES ${INFER_IR_PASSES} anakin_subgraph_pass CACHE INTERNAL "")
endif()