Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
932bbe95
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
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看板
未验证
提交
932bbe95
编写于
9月 02, 2020
作者:
Z
Zhaolong Xing
提交者:
GitHub
9月 02, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix pool trt plugin bug (#26463)
test=develop
上级
0a29fc85
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
40 addition
and
21 deletion
+40
-21
paddle/fluid/inference/tensorrt/plugin/pool_op_plugin.cu
paddle/fluid/inference/tensorrt/plugin/pool_op_plugin.cu
+40
-21
未找到文件。
paddle/fluid/inference/tensorrt/plugin/pool_op_plugin.cu
浏览文件 @
932bbe95
...
...
@@ -104,32 +104,51 @@ nvinfer1::DimsExprs PoolPluginDynamic::getOutputDimensions(
auto
stri_0
=
expr_builder
.
constant
(
strides_
[
0
]);
auto
stri_1
=
expr_builder
.
constant
(
strides_
[
1
]);
auto
one_value
=
expr_builder
.
constant
(
1
);
auto
tmp1_0
=
expr_builder
.
constant
((
-
ksize_
[
0
]
+
2
*
paddings_
[
0
])
/
strides_
[
0
]
+
1
);
auto
tmp1_1
=
expr_builder
.
constant
((
-
ksize_
[
1
]
+
2
*
paddings_
[
1
])
/
strides_
[
1
]
+
1
);
auto
v0_tmp
=
expr_builder
.
constant
(
-
ksize_
[
0
]
+
2
*
paddings_
[
0
]);
auto
v1_tmp
=
expr_builder
.
constant
(
-
ksize_
[
1
]
+
2
*
paddings_
[
1
]);
auto
tmp2_0
=
expr_builder
.
constant
(
(
-
ksize_
[
0
]
+
2
*
paddings_
[
0
]
+
strides_
[
0
]
-
1
)
/
strides_
[
0
]
+
1
);
auto
tmp2_1
=
expr_builder
.
constant
(
(
-
ksize_
[
1
]
+
2
*
paddings_
[
1
]
+
strides_
[
1
]
-
1
)
/
strides_
[
1
]
+
1
);
auto
*
a_d
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kCEIL_DIV
,
*
inputs
[
0
].
d
[
2
],
*
stri_0
);
auto
*
b_d
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kCEIL_DIV
,
*
inputs
[
0
].
d
[
3
],
*
stri_1
);
auto
ceil_tmp
=
expr_builder
.
constant
(
-
ksize_
[
0
]
+
2
*
paddings_
[
0
]
+
strides_
[
0
]
-
1
);
auto
ceil1_tmp
=
expr_builder
.
constant
(
-
ksize_
[
1
]
+
2
*
paddings_
[
1
]
+
strides_
[
1
]
-
1
);
if
(
!
ceil_mode_
)
{
output
.
d
[
2
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
a_d
,
*
tmp1_0
);
output
.
d
[
3
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
b_d
,
*
tmp1_1
);
output
.
d
[
2
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kFLOOR_DIV
,
*
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
inputs
[
0
].
d
[
2
],
*
v0_tmp
),
*
stri_0
),
*
one_value
);
output
.
d
[
3
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kFLOOR_DIV
,
*
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
inputs
[
0
].
d
[
3
],
*
v1_tmp
),
*
stri_1
),
*
one_value
);
}
else
{
output
.
d
[
2
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
a_d
,
*
tmp2_0
);
output
.
d
[
3
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
b_d
,
*
tmp2_1
);
output
.
d
[
2
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kFLOOR_DIV
,
*
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
inputs
[
0
].
d
[
2
],
*
ceil_tmp
),
*
stri_0
),
*
one_value
);
output
.
d
[
3
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kFLOOR_DIV
,
*
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
inputs
[
0
].
d
[
3
],
*
ceil1_tmp
),
*
stri_1
),
*
one_value
);
}
return
output
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录