diff --git a/paddle/fluid/inference/tensorrt/convert/CMakeLists.txt b/paddle/fluid/inference/tensorrt/convert/CMakeLists.txt index aebfa3d983d1b9eb7328275fbf2dbcae1d96cba2..60a5d0f282525c730819d78a306018fb2d041e46 100644 --- a/paddle/fluid/inference/tensorrt/convert/CMakeLists.txt +++ b/paddle/fluid/inference/tensorrt/convert/CMakeLists.txt @@ -103,13 +103,7 @@ nv_test( nv_test( test_custom_plugin_creater SRCS test_custom_plugin_creater.cc - DEPS paddle_framework - ${GLOB_OPERATOR_DEPS} - tensorrt_engine - tensorrt_plugin - tensorrt_converter - op_meta_info - custom_operator) + DEPS paddle_framework tensorrt_converter op_meta_info custom_operator) if(WITH_ONNXRUNTIME AND WIN32) # Copy onnxruntime for some c++ test in Windows, since the test will diff --git a/paddle/fluid/inference/tensorrt/convert/test_custom_plugin_creater.cc b/paddle/fluid/inference/tensorrt/convert/test_custom_plugin_creater.cc index a5c4627c407143cb09df08fb66cb32b0f0e45eb7..2a3ead9c8e684308bc0c86a145a905e975ebf063 100644 --- a/paddle/fluid/inference/tensorrt/convert/test_custom_plugin_creater.cc +++ b/paddle/fluid/inference/tensorrt/convert/test_custom_plugin_creater.cc @@ -102,6 +102,8 @@ TEST(CustomPluginCreater, StaticShapePlugin) { framework::Scope scope; + tensorrt::plugin::TrtPluginRegistry::Global()->RegistToTrt(); + auto &custom_plugin_tell = OpTeller::Global().GetCustomPluginTeller(); framework::OpDesc custom_op(*op_desc, nullptr); @@ -186,6 +188,8 @@ TEST(CustomPluginCreater, DynamicShapePlugin) { framework::Scope scope; + tensorrt::plugin::TrtPluginRegistry::Global()->RegistToTrt(); + auto &custom_plugin_tell = OpTeller::Global().GetCustomPluginTeller(); framework::OpDesc custom_op(*op_desc, nullptr);