Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
419c2d14
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
419c2d14
编写于
1月 06, 2023
作者:
张
张春乔
提交者:
GitHub
1月 06, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Expansions of some unmaintained pr (#49551)
上级
a214e5dc
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
28 addition
and
7 deletion
+28
-7
paddle/fluid/platform/dynload/tensorrt.cc
paddle/fluid/platform/dynload/tensorrt.cc
+14
-4
paddle/phi/backends/dynload/tensorrt.cc
paddle/phi/backends/dynload/tensorrt.cc
+13
-2
python/paddle/tensor/manipulation.py
python/paddle/tensor/manipulation.py
+1
-1
未找到文件。
paddle/fluid/platform/dynload/tensorrt.cc
浏览文件 @
419c2d14
...
@@ -41,10 +41,20 @@ void* GetDsoHandle(const std::string& dso_name) {
...
@@ -41,10 +41,20 @@ void* GetDsoHandle(const std::string& dso_name) {
void
*
dso_handle
=
dlopen
(
dso_name
.
c_str
(),
dynload_flags
);
void
*
dso_handle
=
dlopen
(
dso_name
.
c_str
(),
dynload_flags
);
PADDLE_ENFORCE_NOT_NULL
(
dso_handle
,
PADDLE_ENFORCE_NOT_NULL
(
dso_handle
,
paddle
::
platform
::
errors
::
NotFound
(
paddle
::
platform
::
errors
::
NotFound
(
"TensorRT is needed, "
"TensorRT is needed, "
"but TensorRT dynamic library is not found."
));
"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
;
return
dso_handle
;
}
}
...
...
paddle/phi/backends/dynload/tensorrt.cc
浏览文件 @
419c2d14
...
@@ -42,8 +42,19 @@ void* GetDsoHandle(const std::string& dso_name) {
...
@@ -42,8 +42,19 @@ void* GetDsoHandle(const std::string& dso_name) {
PADDLE_ENFORCE_NOT_NULL
(
PADDLE_ENFORCE_NOT_NULL
(
dso_handle
,
dso_handle
,
phi
::
errors
::
NotFound
(
"TensorRT is needed, "
phi
::
errors
::
NotFound
(
"but TensorRT dynamic library is not found."
));
"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
;
return
dso_handle
;
}
}
...
...
python/paddle/tensor/manipulation.py
浏览文件 @
419c2d14
...
@@ -1272,7 +1272,7 @@ def broadcast_tensors(input, name=None):
...
@@ -1272,7 +1272,7 @@ def broadcast_tensors(input, name=None):
last_index
=
output_shape_r_last_tensor_index
[
i
]
last_index
=
output_shape_r_last_tensor_index
[
i
]
raise
TypeError
(
raise
TypeError
(
"Input tensors to broadcast_tensors does not follow bcast semantics"
"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
]:
if
output_shape_r
[
i
]
<=
shape
[
i
]:
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录