CMakeLists.txt 1.4 KB
Newer Older
1 2
# Compiling with WITH_PYTHON=ON and WITH_TENSORRT=ON failed on windows.
# Temporarily add paddle_inference_api dependency to solve the problem
3
if(WIN32)
4 5 6
  nv_library(
    tensorrt_engine
    SRCS engine.cc trt_int8_calibrator.cc
R
Ruibiao Chen 已提交
7
    DEPS ${GLOB_OPERATOR_DEPS} framework_proto device_context
8
         paddle_inference_api)
9
else()
10 11 12
  nv_library(
    tensorrt_engine
    SRCS engine.cc trt_int8_calibrator.cc
R
Ruibiao Chen 已提交
13
    DEPS ${GLOB_OPERATOR_DEPS} framework_proto device_context)
14
endif()
W
weishengying 已提交
15 16 17 18 19 20 21 22
nv_library(
  tensorrt_dynamic_shape_infermeta_factory
  SRCS dynamic_shape_infermeta.cc
  DEPS framework_proto)
nv_library(
  tensorrt_plugin_arg_mapping_context
  SRCS plugin_arg_mapping_context.cc
  DEPS framework_proto)
23 24 25
nv_library(
  tensorrt_op_teller
  SRCS op_teller.cc
W
weishengying 已提交
26
  DEPS framework_proto device_context tensorrt_dynamic_shape_infermeta_factory)
27 28 29 30 31 32
nv_test(
  test_tensorrt
  SRCS test_tensorrt.cc
  DEPS dynload_cuda device_context dynamic_loader)
nv_test(
  test_tensorrt_engine
33 34
  SRCS test_engine.cc test_dynamic_engine.cc
  DEPS dynload_cuda tensorrt_engine tensorrt_plugin)
W
weishengying 已提交
35 36 37 38
nv_test(
  test_arg_mapping_context
  SRCS test_arg_mapping_context.cc
  DEPS framework_proto tensorrt_plugin_arg_mapping_context)
39 40 41 42 43 44 45

if(WITH_ONNXRUNTIME AND WIN32)
  # Copy onnxruntime for some c++ test in Windows, since the test will
  # be build only in CI, so suppose the generator in Windows is Ninja.
  copy_onnx(test_tensorrt_engine)
endif()

N
nhzlx 已提交
46
add_subdirectory(plugin)
L
Luo Tao 已提交
47
add_subdirectory(convert)