From e3fc4cffa370479f000a6bb6ed31115329e68274 Mon Sep 17 00:00:00 2001 From: zlsh80826 Date: Fri, 7 Aug 2020 13:51:44 +0800 Subject: [PATCH] add NVINFER_PLUGIN option --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 265ddc9504..586628dc48 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.") -- GitLab