Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
cda5dc7c
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cda5dc7c
编写于
3月 02, 2022
作者:
H
HexToString
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix auto padding
上级
fcd0242f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
10 deletion
+9
-10
core/predictor/framework/bsf.h
core/predictor/framework/bsf.h
+9
-10
未找到文件。
core/predictor/framework/bsf.h
100644 → 100755
浏览文件 @
cda5dc7c
...
...
@@ -16,7 +16,6 @@
#include <errno.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <list>
...
...
@@ -65,7 +64,7 @@ struct Task {
typedef
InItemT
InType
;
typedef
OutItemT
OutType
;
typedef
Task
<
InItemT
,
OutItemT
>
TaskT
;
typedef
std
::
vector
<
size_
t
>
ShapeVector
;
typedef
std
::
vector
<
in
t
>
ShapeVector
;
typedef
std
::
vector
<
ShapeVector
>
VectorOfShapeVector
;
typedef
baidu
::
paddle_serving
::
predictor
::
MempoolWrapper
MempoolWrapper
;
...
...
@@ -497,7 +496,7 @@ class BatchTasks {
typedef
typename
TaskT
::
InType
InType
;
typedef
typename
TaskT
::
OutType
OutType
;
typedef
TaskMeta
<
TaskT
>
TaskMetaT
;
typedef
std
::
vector
<
size_
t
>
ShapeVector
;
typedef
std
::
vector
<
in
t
>
ShapeVector
;
typedef
std
::
vector
<
ShapeVector
>
VectorOfShapeVector
;
typedef
std
::
vector
<
size_t
>
LodVector
;
typedef
std
::
vector
<
LodVector
>
PaddleTensorLod
;
...
...
@@ -567,9 +566,9 @@ class BatchTasks {
return
2
;
}
vector
<
size_t
>
multiplies_1
(
vector_of_max_shape
.
size
());
vector
<
size_t
>
multiplies_2
(
vector_of_max_shape
.
size
());
vector
<
size_t
>
temp_multiplies
(
vector_of_max_shape
.
size
());
std
::
vector
<
size_t
>
multiplies_1
(
vector_of_max_shape
.
size
());
std
::
vector
<
size_t
>
multiplies_2
(
vector_of_max_shape
.
size
());
std
::
vector
<
size_t
>
temp_multiplies
(
vector_of_max_shape
.
size
());
VectorOfShapeVector
temp_vector_max_shape
(
vector_of_max_shape
.
size
());
for
(
size_t
i
=
0
;
i
<
vector_of_max_shape
.
size
();
++
i
)
{
if
(
vector_of_max_shape
[
i
].
size
()
!=
task_vector_shape
[
i
].
size
())
...
...
@@ -590,8 +589,8 @@ class BatchTasks {
task_vector_shape
[
i
].
end
(),
1
,
std
::
multiplies
<
size_t
>
());
if
((
abs
(
temp_multiplies
[
i
]
-
multiplies_1
[
i
])
<=
ABSOLUTE_ERROR
&&
abs
(
temp_multiplies
[
i
]
-
multiplies_2
[
i
])
<=
ABSOLUTE_ERROR
)
||
if
((
l
abs
(
temp_multiplies
[
i
]
-
multiplies_1
[
i
])
<=
ABSOLUTE_ERROR
&&
l
abs
(
temp_multiplies
[
i
]
-
multiplies_2
[
i
])
<=
ABSOLUTE_ERROR
)
||
(
temp_multiplies
[
i
]
/
multiplies_1
[
i
]
>=
RELATIVE_ERROR
&&
temp_multiplies
[
i
]
/
multiplies_2
[
i
]
>=
RELATIVE_ERROR
))
{
continue
;
...
...
@@ -698,7 +697,7 @@ class BatchTasks {
// batch.merge_tasks() is thread-safe function
// cause batch is a local variable and Task is just read, not written.
void
copy_element_value
(
size_t
)
void
merge_tasks
()
{
void
merge_tasks
()
{
if
(
_taskmeta_vector
.
size
()
<=
0
)
{
return
;
}
...
...
@@ -1396,7 +1395,7 @@ class TaskExecutor {
typedef
typename
TaskT
::
OutVectorT
OutVectorT
;
typedef
std
::
vector
<
TaskT
>
TaskArrayT
;
typedef
baidu
::
paddle_serving
::
predictor
::
MempoolWrapper
MempoolWrapper
;
typedef
std
::
vector
<
size_
t
>
ShapeVector
;
typedef
std
::
vector
<
in
t
>
ShapeVector
;
typedef
std
::
vector
<
ShapeVector
>
VectorOfShapeVector
;
TaskExecutor
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录