Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
ecbf74db
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
ecbf74db
编写于
9月 03, 2020
作者:
Z
Zhaolong Xing
提交者:
GitHub
9月 03, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CHERRY_PICK 26463 (#26920)
fix pool trt plugin bug test=release/2.0-beta
上级
2cd5ee9c
变更
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
浏览文件 @
ecbf74db
...
@@ -104,32 +104,51 @@ nvinfer1::DimsExprs PoolPluginDynamic::getOutputDimensions(
...
@@ -104,32 +104,51 @@ nvinfer1::DimsExprs PoolPluginDynamic::getOutputDimensions(
auto
stri_0
=
expr_builder
.
constant
(
strides_
[
0
]);
auto
stri_0
=
expr_builder
.
constant
(
strides_
[
0
]);
auto
stri_1
=
expr_builder
.
constant
(
strides_
[
1
]);
auto
stri_1
=
expr_builder
.
constant
(
strides_
[
1
]);
auto
one_value
=
expr_builder
.
constant
(
1
);
auto
tmp1_0
=
auto
v0_tmp
=
expr_builder
.
constant
(
-
ksize_
[
0
]
+
2
*
paddings_
[
0
]);
expr_builder
.
constant
((
-
ksize_
[
0
]
+
2
*
paddings_
[
0
])
/
strides_
[
0
]
+
1
);
auto
v1_tmp
=
expr_builder
.
constant
(
-
ksize_
[
1
]
+
2
*
paddings_
[
1
]);
auto
tmp1_1
=
expr_builder
.
constant
((
-
ksize_
[
1
]
+
2
*
paddings_
[
1
])
/
strides_
[
1
]
+
1
);
auto
tmp2_0
=
expr_builder
.
constant
(
auto
ceil_tmp
=
(
-
ksize_
[
0
]
+
2
*
paddings_
[
0
]
+
strides_
[
0
]
-
1
)
/
strides_
[
0
]
+
1
);
expr_builder
.
constant
(
-
ksize_
[
0
]
+
2
*
paddings_
[
0
]
+
strides_
[
0
]
-
1
);
auto
tmp2_1
=
expr_builder
.
constant
(
auto
ceil1_tmp
=
(
-
ksize_
[
1
]
+
2
*
paddings_
[
1
]
+
strides_
[
1
]
-
1
)
/
strides_
[
1
]
+
1
);
expr_builder
.
constant
(
-
ksize_
[
1
]
+
2
*
paddings_
[
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
);
if
(
!
ceil_mode_
)
{
if
(
!
ceil_mode_
)
{
output
.
d
[
2
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
output
.
d
[
2
]
=
expr_builder
.
operation
(
*
a_d
,
*
tmp1_0
);
nvinfer1
::
DimensionOperation
::
kSUM
,
output
.
d
[
3
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
expr_builder
.
operation
(
*
b_d
,
*
tmp1_1
);
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
{
}
else
{
output
.
d
[
2
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
output
.
d
[
2
]
=
expr_builder
.
operation
(
*
a_d
,
*
tmp2_0
);
nvinfer1
::
DimensionOperation
::
kSUM
,
output
.
d
[
3
]
=
expr_builder
.
operation
(
nvinfer1
::
DimensionOperation
::
kSUM
,
*
expr_builder
.
operation
(
*
b_d
,
*
tmp2_1
);
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
;
return
output
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录