Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
c6c8d605
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c6c8d605
编写于
11月 28, 2018
作者:
qnqinan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix a bug in format_conv_data function
上级
c983ca0c
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
10 addition
and
9 deletion
+10
-9
src/fpga/V2/api.cpp
src/fpga/V2/api.cpp
+2
-2
src/fpga/V2/api.h
src/fpga/V2/api.h
+1
-1
src/operators/kernel/fpga/V2/conv_add_bn_kernel.cpp
src/operators/kernel/fpga/V2/conv_add_bn_kernel.cpp
+1
-1
src/operators/kernel/fpga/V2/conv_add_bn_relu_kernel.cpp
src/operators/kernel/fpga/V2/conv_add_bn_relu_kernel.cpp
+1
-1
src/operators/kernel/fpga/V2/conv_add_kernel.cpp
src/operators/kernel/fpga/V2/conv_add_kernel.cpp
+1
-1
src/operators/kernel/fpga/V2/conv_add_relu_kernel.cpp
src/operators/kernel/fpga/V2/conv_add_relu_kernel.cpp
+1
-1
src/operators/kernel/fpga/V2/conv_bn_kernel.cpp
src/operators/kernel/fpga/V2/conv_bn_kernel.cpp
+1
-1
src/operators/kernel/fpga/V2/conv_bn_relu_kernel.cpp
src/operators/kernel/fpga/V2/conv_bn_relu_kernel.cpp
+2
-1
未找到文件。
src/fpga/V2/api.cpp
浏览文件 @
c6c8d605
...
...
@@ -132,11 +132,11 @@ void format_concat_output(framework::Tensor *out, int height, int width,
}
int
format_conv_data
(
framework
::
Tensor
*
filter_tensor
,
framework
::
Tensor
*
ofm_tensor
,
float
*
bs_ptr
,
int
group
)
{
framework
::
Tensor
*
ofm_tensor
,
float
*
*
bs_ptr
,
int
group
)
{
float
max_value
=
fpga
::
filter_find_max
(
filter_tensor
);
fpga
::
format_filter
(
filter_tensor
,
max_value
,
group
);
int
aligned_num
=
get_aligned_filter_num
(
filter_tensor
);
fpga
::
format_bias_scale_array
(
&
bs_ptr
,
fpga
::
format_bias_scale_array
(
bs_ptr
,
(
int
)
filter_tensor
->
dims
()[
0
],
// NOLINT
aligned_num
);
int
aligned_channel
=
fpga
::
get_conv_output_channel
(
filter_tensor
);
...
...
src/fpga/V2/api.h
浏览文件 @
c6c8d605
...
...
@@ -39,7 +39,7 @@ void format_bias_scale_array(float** bias_scale_array, int filter_num,
void
format_concat_output
(
framework
::
Tensor
*
out
,
int
height
,
int
width
,
uint32_t
out_channel
);
int
format_conv_data
(
framework
::
Tensor
*
filter_tensor
,
framework
::
Tensor
*
ofm_tensor
,
float
*
bs_ptr
,
int
group
);
framework
::
Tensor
*
ofm_tensor
,
float
*
*
bs_ptr
,
int
group
);
int
format_fc_data
(
framework
::
Tensor
*
filter_tensor
,
framework
::
Tensor
*
ofm_tensor
,
float
*
bs_ptr
);
void
fill_split_arg
(
struct
SplitConvArgs
*
arg
,
framework
::
Tensor
*
input
,
...
...
src/operators/kernel/fpga/V2/conv_add_bn_kernel.cpp
浏览文件 @
c6c8d605
...
...
@@ -58,7 +58,7 @@ bool ConvAddBNKernel<FPGA, float>::Init(FusionConvAddBNParam<FPGA> *param) {
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
fpga
::
format_conv_data
(
filter
,
out
,
bs_ptr
,
param
->
Groups
());
fpga
::
format_conv_data
(
filter
,
out
,
&
bs_ptr
,
param
->
Groups
());
fpga
::
SplitConvArgs
conv_arg
=
{
0
};
fpga
::
fill_split_arg
(
&
conv_arg
,
input
,
out
,
filter
,
relu_enabled
,
...
...
src/operators/kernel/fpga/V2/conv_add_bn_relu_kernel.cpp
浏览文件 @
c6c8d605
...
...
@@ -56,7 +56,7 @@ bool ConvAddBNReluKernel<FPGA, float>::Init(
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
fpga
::
format_conv_data
(
filter
,
out
,
bs_ptr
,
param
->
Groups
());
fpga
::
format_conv_data
(
filter
,
out
,
&
bs_ptr
,
param
->
Groups
());
fpga
::
SplitConvArgs
conv_arg
=
{
0
};
fpga
::
fill_split_arg
(
&
conv_arg
,
input
,
out
,
filter
,
relu_enabled
,
...
...
src/operators/kernel/fpga/V2/conv_add_kernel.cpp
浏览文件 @
c6c8d605
...
...
@@ -38,7 +38,7 @@ bool ConvAddKernel<FPGA, float>::Init(FusionConvAddParam<FPGA> *param) {
bs_ptr
[
i
]
=
bias_ptr
[
i
];
}
fpga
::
format_conv_data
(
filter
,
out
,
bs_ptr
,
param
->
Groups
());
fpga
::
format_conv_data
(
filter
,
out
,
&
bs_ptr
,
param
->
Groups
());
fpga
::
SplitConvArgs
conv_arg
=
{
0
};
fpga
::
fill_split_arg
(
&
conv_arg
,
input
,
out
,
filter
,
relu_enabled
,
...
...
src/operators/kernel/fpga/V2/conv_add_relu_kernel.cpp
浏览文件 @
c6c8d605
...
...
@@ -38,7 +38,7 @@ bool ConvAddReluKernel<FPGA, float>::Init(FusionConvAddReluParam<FPGA> *param) {
bs_ptr
[
i
]
=
bias_ptr
[
i
];
}
fpga
::
format_conv_data
(
filter
,
out
,
bs_ptr
,
param
->
Groups
());
fpga
::
format_conv_data
(
filter
,
out
,
&
bs_ptr
,
param
->
Groups
());
fpga
::
SplitConvArgs
conv_arg
=
{
0
};
fpga
::
fill_split_arg
(
&
conv_arg
,
input
,
out
,
filter
,
relu_enabled
,
...
...
src/operators/kernel/fpga/V2/conv_bn_kernel.cpp
浏览文件 @
c6c8d605
...
...
@@ -50,7 +50,7 @@ bool ConvBNKernel<FPGA, float>::Init(FusionConvBNParam<FPGA> *param) {
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
fpga
::
format_conv_data
(
filter
,
out
,
bs_ptr
,
param
->
Groups
());
fpga
::
format_conv_data
(
filter
,
out
,
&
bs_ptr
,
param
->
Groups
());
fpga
::
SplitConvArgs
conv_arg
=
{
0
};
fpga
::
fill_split_arg
(
&
conv_arg
,
input
,
out
,
filter
,
relu_enabled
,
...
...
src/operators/kernel/fpga/V2/conv_bn_relu_kernel.cpp
浏览文件 @
c6c8d605
...
...
@@ -15,6 +15,7 @@ limitations under the License. */
#ifdef FUSION_CONVBNRELU_OP
#include "operators/kernel/conv_bn_relu_kernel.h"
#include "fpga/V2/filter.h"
namespace
paddle_mobile
{
namespace
operators
{
...
...
@@ -50,7 +51,7 @@ bool ConvBNReluKernel<FPGA, float>::Init(FusionConvBNReluParam<FPGA> *param) {
param
->
SetNewScale
(
new_scale
);
param
->
SetNewBias
(
new_bias
);
fpga
::
format_conv_data
(
filter
,
out
,
bs_ptr
,
param
->
Groups
());
fpga
::
format_conv_data
(
filter
,
out
,
&
bs_ptr
,
param
->
Groups
());
fpga
::
SplitConvArgs
conv_arg
=
{
0
};
fpga
::
fill_split_arg
(
&
conv_arg
,
input
,
out
,
filter
,
relu_enabled
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录