Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
f04dbebb
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看板
提交
f04dbebb
编写于
10月 31, 2018
作者:
L
liuruilong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
format files
上级
89d92093
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
22 addition
and
16 deletion
+22
-16
src/operators/fusion_conv_add_add_prelu_op.h
src/operators/fusion_conv_add_add_prelu_op.h
+1
-1
src/operators/fusion_conv_add_op.h
src/operators/fusion_conv_add_op.h
+1
-1
src/operators/fusion_conv_add_prelu_op.h
src/operators/fusion_conv_add_prelu_op.h
+1
-2
src/operators/fusion_conv_bn_add_relu_op.h
src/operators/fusion_conv_bn_add_relu_op.h
+2
-2
src/operators/fusion_dwconv_bn_relu_op.h
src/operators/fusion_dwconv_bn_relu_op.h
+1
-1
src/operators/im2sequence_op.h
src/operators/im2sequence_op.h
+1
-1
src/operators/kernel/cl/elementwise_add_kernel.cpp
src/operators/kernel/cl/elementwise_add_kernel.cpp
+14
-7
src/operators/pool_op.cpp
src/operators/pool_op.cpp
+1
-1
未找到文件。
src/operators/fusion_conv_add_add_prelu_op.h
浏览文件 @
f04dbebb
...
@@ -17,8 +17,8 @@ limitations under the License. */
...
@@ -17,8 +17,8 @@ limitations under the License. */
#pragma once
#pragma once
#include <string>
#include <string>
#include <vector>
#include <utility>
#include <utility>
#include <vector>
#include "framework/operator.h"
#include "framework/operator.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "operators/kernel/conv_add_add_prelu_kernel.h"
#include "operators/kernel/conv_add_add_prelu_kernel.h"
...
...
src/operators/fusion_conv_add_op.h
浏览文件 @
f04dbebb
...
@@ -19,8 +19,8 @@ limitations under the License. */
...
@@ -19,8 +19,8 @@ limitations under the License. */
#include <vector>
#include <vector>
#include "framework/operator.h"
#include "framework/operator.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "operators/op_param.h"
#include "operators/kernel/conv_add_kernel.h"
#include "operators/kernel/conv_add_kernel.h"
#include "operators/op_param.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
...
...
src/operators/fusion_conv_add_prelu_op.h
浏览文件 @
f04dbebb
...
@@ -39,8 +39,7 @@ class FusionConvAddPReluOpMatcher : public framework::FusionOpMatcher {
...
@@ -39,8 +39,7 @@ class FusionConvAddPReluOpMatcher : public framework::FusionOpMatcher {
std
::
vector
<
std
::
shared_ptr
<
framework
::
Node
>>
*
removed_nodes
)
{
std
::
vector
<
std
::
shared_ptr
<
framework
::
Node
>>
*
removed_nodes
)
{
node
->
Folder
(
node_
.
Depth
(),
Type
(),
node
->
Folder
(
node_
.
Depth
(),
Type
(),
{{
G_OP_TYPE_ELEMENTWISE_ADD
,
{{
"Y"
,
"Y"
}}},
{{
G_OP_TYPE_ELEMENTWISE_ADD
,
{{
"Y"
,
"Y"
}}},
{
G_OP_TYPE_PRELU
,
{{
"Alpha"
,
"Alpha"
}}}
{
G_OP_TYPE_PRELU
,
{{
"Alpha"
,
"Alpha"
}}}},
},
removed_nodes
);
removed_nodes
);
}
}
std
::
string
Type
()
{
return
G_OP_TYPE_FUSION_CONV_ADD_PRELU
;
}
std
::
string
Type
()
{
return
G_OP_TYPE_FUSION_CONV_ADD_PRELU
;
}
...
...
src/operators/fusion_conv_bn_add_relu_op.h
浏览文件 @
f04dbebb
...
@@ -17,12 +17,12 @@ limitations under the License. */
...
@@ -17,12 +17,12 @@ limitations under the License. */
#pragma once
#pragma once
#include <string>
#include <string>
#include <vector>
#include <utility>
#include <utility>
#include <vector>
#include "framework/operator.h"
#include "framework/operator.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "operators/op_param.h"
#include "operators/kernel/conv_bn_add_relu_kernel.h"
#include "operators/kernel/conv_bn_add_relu_kernel.h"
#include "operators/op_param.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
...
...
src/operators/fusion_dwconv_bn_relu_op.h
浏览文件 @
f04dbebb
...
@@ -20,8 +20,8 @@ limitations under the License. */
...
@@ -20,8 +20,8 @@ limitations under the License. */
#include <vector>
#include <vector>
#include "framework/operator.h"
#include "framework/operator.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include "operators/op_param.h"
#include "operators/kernel/dwconv_bn_relu_kernel.h"
#include "operators/kernel/dwconv_bn_relu_kernel.h"
#include "operators/op_param.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
...
...
src/operators/im2sequence_op.h
浏览文件 @
f04dbebb
...
@@ -17,9 +17,9 @@ limitations under the License. */
...
@@ -17,9 +17,9 @@ limitations under the License. */
#pragma once
#pragma once
#include <string>
#include <string>
#include "operators/op_param.h"
#include "framework/operator.h"
#include "framework/operator.h"
#include "operators/kernel/im2sequence_kernel.h"
#include "operators/kernel/im2sequence_kernel.h"
#include "operators/op_param.h"
namespace
paddle_mobile
{
namespace
paddle_mobile
{
namespace
operators
{
namespace
operators
{
...
...
src/operators/kernel/cl/elementwise_add_kernel.cpp
浏览文件 @
f04dbebb
...
@@ -49,11 +49,14 @@ void ElementwiseAddKernel<GPU_CL, float>::Compute(
...
@@ -49,11 +49,14 @@ void ElementwiseAddKernel<GPU_CL, float>::Compute(
cl_mem
input_image
=
input
->
GetCLImage
();
cl_mem
input_image
=
input
->
GetCLImage
();
cl_mem
bias_image
=
bias
->
GetCLImage
();
cl_mem
bias_image
=
bias
->
GetCLImage
();
cl_mem
output_image
=
output
->
GetCLImage
();
cl_mem
output_image
=
output
->
GetCLImage
();
status
=
clSetKernelArg
(
kernel
,
0
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
input_image
));
status
=
clSetKernelArg
(
kernel
,
0
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
input_image
));
CL_CHECK_ERRORS
(
status
);
CL_CHECK_ERRORS
(
status
);
status
=
clSetKernelArg
(
kernel
,
1
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
bias_image
));
status
=
clSetKernelArg
(
kernel
,
1
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
bias_image
));
CL_CHECK_ERRORS
(
status
);
CL_CHECK_ERRORS
(
status
);
status
=
clSetKernelArg
(
kernel
,
2
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
output_image
));
status
=
clSetKernelArg
(
kernel
,
2
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
output_image
));
CL_CHECK_ERRORS
(
status
);
CL_CHECK_ERRORS
(
status
);
int
width
=
input
->
ImageWidth
();
int
width
=
input
->
ImageWidth
();
int
height
=
input
->
ImageHeight
();
int
height
=
input
->
ImageHeight
();
...
@@ -67,13 +70,17 @@ void ElementwiseAddKernel<GPU_CL, float>::Compute(
...
@@ -67,13 +70,17 @@ void ElementwiseAddKernel<GPU_CL, float>::Compute(
cl_mem
bias_image
=
bias
->
GetCLImage
();
cl_mem
bias_image
=
bias
->
GetCLImage
();
cl_mem
output_image
=
output
->
GetCLImage
();
cl_mem
output_image
=
output
->
GetCLImage
();
int
tensor_w
=
input
->
dims
()[
3
];
int
tensor_w
=
input
->
dims
()[
3
];
status
=
clSetKernelArg
(
kernel
,
0
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
input_image
));
status
=
clSetKernelArg
(
kernel
,
0
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
input_image
));
CL_CHECK_ERRORS
(
status
);
CL_CHECK_ERRORS
(
status
);
status
=
clSetKernelArg
(
kernel
,
1
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
bias_image
));
status
=
clSetKernelArg
(
kernel
,
1
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
bias_image
));
CL_CHECK_ERRORS
(
status
);
CL_CHECK_ERRORS
(
status
);
status
=
clSetKernelArg
(
kernel
,
2
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
output_image
));
status
=
clSetKernelArg
(
kernel
,
2
,
sizeof
(
cl_mem
),
reinterpret_cast
<
void
*>
(
&
output_image
));
CL_CHECK_ERRORS
(
status
);
CL_CHECK_ERRORS
(
status
);
status
=
clSetKernelArg
(
kernel
,
3
,
sizeof
(
cl_int
),
reinterpret_cast
<
void
*>
(
&
tensor_w
));
status
=
clSetKernelArg
(
kernel
,
3
,
sizeof
(
cl_int
),
reinterpret_cast
<
void
*>
(
&
tensor_w
));
CL_CHECK_ERRORS
(
status
);
CL_CHECK_ERRORS
(
status
);
int
width
=
input
->
ImageWidth
();
int
width
=
input
->
ImageWidth
();
int
height
=
input
->
ImageHeight
();
int
height
=
input
->
ImageHeight
();
...
...
src/operators/pool_op.cpp
浏览文件 @
f04dbebb
...
@@ -14,8 +14,8 @@ limitations under the License. */
...
@@ -14,8 +14,8 @@ limitations under the License. */
#ifdef POOL_OP
#ifdef POOL_OP
#include <vector>
#include "operators/pool_op.h"
#include "operators/pool_op.h"
#include <vector>
#include "framework/op_proto_maker.h"
#include "framework/op_proto_maker.h"
#include "framework/op_registry.h"
#include "framework/op_registry.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录