未验证 提交 419c2d14 编写于 作者: 张春乔 提交者: GitHub

Expansions of some unmaintained pr (#49551)

上级 a214e5dc
......@@ -41,10 +41,20 @@ void* GetDsoHandle(const std::string& dso_name) {
void* dso_handle = dlopen(dso_name.c_str(), dynload_flags);
PADDLE_ENFORCE_NOT_NULL(dso_handle,
paddle::platform::errors::NotFound(
"TensorRT is needed, "
"but TensorRT dynamic library is not found."));
PADDLE_ENFORCE_NOT_NULL(
dso_handle,
paddle::platform::errors::NotFound(
"TensorRT is needed, "
"but TensorRT dynamic library is not found.\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"));
return dso_handle;
}
......
......@@ -42,8 +42,19 @@ void* GetDsoHandle(const std::string& dso_name) {
PADDLE_ENFORCE_NOT_NULL(
dso_handle,
phi::errors::NotFound("TensorRT is needed, "
"but TensorRT dynamic library is not found."));
phi::errors::NotFound(
"TensorRT is needed, "
"but TensorRT dynamic library is not found.\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"));
return dso_handle;
}
......
......@@ -1272,7 +1272,7 @@ def broadcast_tensors(input, name=None):
last_index = output_shape_r_last_tensor_index[i]
raise TypeError(
"Input tensors to broadcast_tensors does not follow bcast semantics"
"Tensor {last_index} conflicts with Tensor {j} in reversed dimension {i}"
f"Tensor {last_index} conflicts with Tensor {j} in reversed dimension {i}"
)
if output_shape_r[i] <= shape[i]:
output_shape_r[i] = shape[i]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册