Skip to content

Commit

Permalink
add no tensorrt warning (#33874)
Browse files Browse the repository at this point in the history
  • Loading branch information
feng_shuai committed Jul 7, 2021
1 parent 375e561 commit 758dd7b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions paddle/fluid/platform/dynload/tensorrt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 758dd7b

Please sign in to comment.