diff --git a/paddle/fluid/platform/dynload/tensorrt.cc b/paddle/fluid/platform/dynload/tensorrt.cc index 1d105a1fd8682552b5b8e375e9d94206fe84ee98..8153877b7bbb892a5c108316f7fe28510fc64b79 100644 --- a/paddle/fluid/platform/dynload/tensorrt.cc +++ b/paddle/fluid/platform/dynload/tensorrt.cc @@ -43,8 +43,17 @@ void* GetDsoHandle(const std::string& dso_name) { if (nullptr == dso_handle) { auto error_msg = "You are using Paddle compiled with TensorRT, but TensorRT dynamic " - "library is not found. Ignore this if TensorRT is not needed.\n"; - std::cerr << error_msg; + "library is not found. Ignore this if TensorRT is not needed.\n" + "The TensorRT that Paddle depends on is not configured correctly.\n" + " Suggestions:\n" + " 1. Check if the TensorRT is installed correctly and its version" + " is matched with paddlepaddle you installed.\n" + " 2. Configure environment variables as " + "follows:\n" + " - Linux: set LD_LIBRARY_PATH by `export LD_LIBRARY_PATH=...`\n" + " - Windows: set PATH by `set PATH=XXX;%PATH%`\n" + " - Mac: set DYLD_LIBRARY_PATH by `export DYLD_LIBRARY_PATH=...`\n"; + LOG(WARNING) << error_msg; } return dso_handle; }