Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
9f343156
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看板
提交
9f343156
编写于
6月 09, 2020
作者:
xiebaiyuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[OPENCL] use depthwise3x3d1 to replace s1 enhance hn performance ,test=develop
上级
24d37695
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
6 deletion
+6
-6
lite/backends/opencl/cl_kernel/image/depthwise_conv2d_kernel.cl
...ackends/opencl/cl_kernel/image/depthwise_conv2d_kernel.cl
+1
-1
lite/kernels/opencl/conv_image_compute.cc
lite/kernels/opencl/conv_image_compute.cc
+4
-4
lite/kernels/opencl/conv_image_compute.h
lite/kernels/opencl/conv_image_compute.h
+1
-1
未找到文件。
lite/backends/opencl/cl_kernel/image/depthwise_conv2d_kernel.cl
浏览文件 @
9f343156
...
@@ -244,7 +244,7 @@ __kernel void depth_conv2d_3x3(
...
@@ -244,7 +244,7 @@ __kernel void depth_conv2d_3x3(
WRITE_IMG_TYPE(CL_DTYPE_CHAR, output_image, output_pos, output);
WRITE_IMG_TYPE(CL_DTYPE_CHAR, output_image, output_pos, output);
}
}
__kernel void depth_conv2d_3x3
s
1(__private const int ou_ch_blk,
__kernel void depth_conv2d_3x3
d
1(__private const int ou_ch_blk,
__private const int ou_w_blk,
__private const int ou_w_blk,
__private const int ou_nh,
__private const int ou_nh,
__read_only image2d_t input,
__read_only image2d_t input,
...
...
lite/kernels/opencl/conv_image_compute.cc
浏览文件 @
9f343156
...
@@ -149,9 +149,9 @@ void ConvImageCompute::PrepareForRun() {
...
@@ -149,9 +149,9 @@ void ConvImageCompute::PrepareForRun() {
}
else
if
(
filter_dims
[
1
]
==
1
&&
x_dims
[
1
]
==
output_dims
[
1
]
&&
}
else
if
(
filter_dims
[
1
]
==
1
&&
x_dims
[
1
]
==
output_dims
[
1
]
&&
kernel_h
==
3
&&
kernel_w
==
3
&&
groups
>
1
)
{
kernel_h
==
3
&&
kernel_w
==
3
&&
groups
>
1
)
{
// depth_conv2d_3x3s1, depth_conv2d_3x3
// depth_conv2d_3x3s1, depth_conv2d_3x3
if
(
stride_h
==
1
&&
dilations
[
0
]
==
1
)
{
if
(
dilations
[
0
]
==
1
)
{
kernel_func_names_
.
push_back
(
"depth_conv2d_3x3
s
1"
);
kernel_func_names_
.
push_back
(
"depth_conv2d_3x3
d
1"
);
impl_
=
&
ConvImageCompute
::
DepthwiseConv2d3x3
s
1
;
impl_
=
&
ConvImageCompute
::
DepthwiseConv2d3x3
d
1
;
{
{
// depthwise spl gws s1
// depthwise spl gws s1
int
c_block
=
(
output_dims
[
1
]
+
3
)
/
4
;
int
c_block
=
(
output_dims
[
1
]
+
3
)
/
4
;
...
@@ -1462,7 +1462,7 @@ void ConvImageCompute::Conv2d7x7opt(bool is_turn) {
...
@@ -1462,7 +1462,7 @@ void ConvImageCompute::Conv2d7x7opt(bool is_turn) {
CLRuntime
::
Global
()
->
command_queue
().
finish
();
CLRuntime
::
Global
()
->
command_queue
().
finish
();
}
}
}
}
void
ConvImageCompute
::
DepthwiseConv2d3x3
s
1
(
bool
is_turn
)
{
void
ConvImageCompute
::
DepthwiseConv2d3x3
d
1
(
bool
is_turn
)
{
auto
&
context
=
ctx_
->
As
<
OpenCLContext
>
();
auto
&
context
=
ctx_
->
As
<
OpenCLContext
>
();
CHECK
(
context
.
cl_context
()
!=
nullptr
);
CHECK
(
context
.
cl_context
()
!=
nullptr
);
const
auto
&
param
=
*
param_
.
get_mutable
<
param_t
>
();
const
auto
&
param
=
*
param_
.
get_mutable
<
param_t
>
();
...
...
lite/kernels/opencl/conv_image_compute.h
浏览文件 @
9f343156
...
@@ -63,7 +63,7 @@ class ConvImageCompute : public KernelLite<TARGET(kOpenCL),
...
@@ -63,7 +63,7 @@ class ConvImageCompute : public KernelLite<TARGET(kOpenCL),
void
Conv2d5x5opt
(
bool
is_turn
=
false
);
void
Conv2d5x5opt
(
bool
is_turn
=
false
);
void
Conv2d7x7
(
bool
is_turn
=
false
);
void
Conv2d7x7
(
bool
is_turn
=
false
);
void
Conv2d7x7opt
(
bool
is_turn
=
false
);
void
Conv2d7x7opt
(
bool
is_turn
=
false
);
void
DepthwiseConv2d3x3
s
1
(
bool
is_turn
=
false
);
void
DepthwiseConv2d3x3
d
1
(
bool
is_turn
=
false
);
void
DepthwiseConv2d3x3
(
bool
is_turn
=
false
);
void
DepthwiseConv2d3x3
(
bool
is_turn
=
false
);
void
DepthwiseConv2d
(
bool
is_turn
=
false
);
void
DepthwiseConv2d
(
bool
is_turn
=
false
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录