diff --git a/CMakeLists.txt b/CMakeLists.txt index 265ddc9504167f21f54a1b1e7777147b3b6d37d9..586628dc48d2d61d130fb2719c45150fdb41a01e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,6 +107,7 @@ option(WITH_LITE "Compile Paddle Fluid with Lite Engine" OFF) option(WITH_NCCL "Compile PaddlePaddle with NCCL support" ON) option(WITH_CRYPTO "Compile PaddlePaddle with crypto support" ON) option(WITH_ARM "Compile PaddlePaddle with arm support" OFF) +option(WITH_NVINFER_PLUGIN "Use plugins of nvinfer_plugin" OFF) # PY_VERSION if(NOT PY_VERSION) @@ -234,6 +235,9 @@ if(ON_INFER) message(STATUS "On inference mode, will take place some specific optimization.") include(inference_lib) add_definitions(-DPADDLE_ON_INFERENCE) + if (WITH_NVINFER_PLUGIN) + add_definitions(-DUSE_NVINFER_PLUGIN) + endif() else() #TODO(luotao), combine this warning with `make inference_lib_dist` command. message(WARNING "On inference mode, will take place some specific optimization. Turn on the ON_INFER flag when building inference_lib only.")